summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterdeleteprefpreset.cpp13
-rwxr-xr-xindra/newview/llfloaterpreference.cpp11
-rwxr-xr-xindra/newview/llfloaterpreference.h1
-rw-r--r--indra/newview/llfloatersaveprefpreset.cpp4
-rw-r--r--indra/newview/llpresetsmanager.cpp2
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_graphics1.xml14
7 files changed, 29 insertions, 20 deletions
diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp
index 73b3474e5c..01b25398dd 100644
--- a/indra/newview/llfloaterdeleteprefpreset.cpp
+++ b/indra/newview/llfloaterdeleteprefpreset.cpp
@@ -69,11 +69,7 @@ void LLFloaterDeletePrefPreset::onBtnDelete()
if (LLPresetsManager::getInstance()->deletePreset(mSubdirectory, name))
{
- std::string preset = mSubdirectory;
- preset[0] = std::toupper(preset[0]);
-
LLSD args;
- args["TYPE"] = preset;
args["NAME"] = name;
LLNotificationsUtil::add("PresetDeleted", args);
}
@@ -87,14 +83,7 @@ void LLFloaterDeletePrefPreset::onPresetsListChange()
EDefaultOptions option = DEFAULT_HIDE;
LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option);
- if(0 != combo->getItemCount())
- {
- delete_btn->setEnabled(TRUE);
- }
- else
- {
- delete_btn->setEnabled(FALSE);
- }
+ delete_btn->setEnabled(0 != combo->getItemCount());
}
void LLFloaterDeletePrefPreset::onBtnCancel()
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 97af9d6ce0..c80ec1a976 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -111,6 +111,7 @@
#include "llpresetsmanager.h"
#include "llviewercontrol.h"
#include "llpresetsmanager.h"
+#include "llfeaturemanager.h"
const F32 MAX_USER_FAR_CLIP = 512.f;
const F32 MIN_USER_FAR_CLIP = 64.f;
@@ -342,6 +343,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this));
mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this));
mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
+ mCommitCallbackRegistrar.add("Pref.Recommended", boost::bind(&LLFloaterPreference::setRecommended, this));
mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this));
mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::refreshUI,this));
@@ -798,6 +800,15 @@ void LLFloaterPreference::setHardwareDefaults()
}
}
+void LLFloaterPreference::setRecommended()
+{
+ LLFeatureManager::getInstance()->applyRecommendedSettings();
+
+ refreshEnabledGraphics();
+
+ LLPresetsManager::getInstance()->savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT);
+}
+
//virtual
void LLFloaterPreference::onClose(bool app_quitting)
{
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 99d133c1ac..4a6a2eda71 100755
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -114,6 +114,7 @@ protected:
void onOpenHardwareSettings();
// callback for defaults
void setHardwareDefaults();
+ void setRecommended();
// callback for when client turns on shaders
void onVertexShaderEnable();
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp
index 31598a8d12..3148978778 100644
--- a/indra/newview/llfloatersaveprefpreset.cpp
+++ b/indra/newview/llfloatersaveprefpreset.cpp
@@ -82,11 +82,7 @@ void LLFloaterSavePrefPreset::onBtnSave()
LLPresetsManager::getInstance()->savePreset(mSubdirectory, name);
- std::string preset = mSubdirectory;
- preset[0] = std::toupper(preset[0]);
-
LLSD args;
- args["TYPE"] = preset;
args["NAME"] = name;
LLNotificationsUtil::add("PresetSaved", args);
}
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index b9497efde6..709181b3ad 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -54,7 +54,7 @@ void LLPresetsManager::createMissingDefault()
// Write current graphic settings to default.xml
// If this name is to be localized additional code will be needed to delete the old default
// when changing languages.
- LLPresetsManager::getInstance()->savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT);
+ savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT);
}
}
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 83370dbba0..1618ea0ec7 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7661,14 +7661,14 @@ Attachment has been saved.
icon="notifytip.tga"
name="PresetSaved"
type="notifytip">
-[TYPE] preset [NAME] has been saved.
+Preset [NAME] has been saved.
</notification>
<notification
icon="notifytip.tga"
name="PresetDeleted"
type="notifytip">
-[TYPE] preset [NAME] has been deleted.
+Preset [NAME] has been deleted.
</notification>
<notification
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index 4248de4d96..837644ed27 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -972,12 +972,24 @@
function="Pref.HardwareDefaults" />
</button>
<button
+ follows="left|bottom"
+ height="23"
+ label="Recommended"
+ layout="topleft"
+ left_pad="5"
+ name="Recommended"
+ top="310"
+ width="115">
+ <button.commit_callback
+ function="Pref.Recommended" />
+ </button>
+ <button
follows="right|bottom"
height="23"
label="Hardware..."
label_selected="Hardware"
layout="topleft"
- left_pad="150"
+ left_pad="25"
name="GraphicsHardwareButton"
top="310"
width="115">