summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterdeleteprefpreset.cpp7
-rw-r--r--indra/newview/llfloaterloadprefpreset.cpp6
-rw-r--r--indra/newview/llfloatersaveprefpreset.cpp8
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_graphics1.xml107
4 files changed, 73 insertions, 55 deletions
diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp
index 68b107a1aa..7dedbbf984 100644
--- a/indra/newview/llfloaterdeleteprefpreset.cpp
+++ b/indra/newview/llfloaterdeleteprefpreset.cpp
@@ -30,9 +30,11 @@
#include "llbutton.h"
#include "llcombobox.h"
+#include "llfloaterpreference.h"
#include "llnotificationsutil.h"
#include "llpresetsmanager.h"
#include "llviewercontrol.h"
+#include "llfloaterreg.h"
LLFloaterDeletePrefPreset::LLFloaterDeletePrefPreset(const LLSD &key)
: LLFloater(key)
@@ -42,6 +44,11 @@ LLFloaterDeletePrefPreset::LLFloaterDeletePrefPreset(const LLSD &key)
// virtual
BOOL LLFloaterDeletePrefPreset::postBuild()
{
+ LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+ if (preferences)
+ {
+ preferences->addDependentFloater(this);
+ }
getChild<LLButton>("delete")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnDelete, this));
getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnCancel, this));
LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeletePrefPreset::onPresetsListChange, this));
diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp
index d831da43f5..403db35cc0 100644
--- a/indra/newview/llfloaterloadprefpreset.cpp
+++ b/indra/newview/llfloaterloadprefpreset.cpp
@@ -42,7 +42,11 @@ LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key)
// virtual
BOOL LLFloaterLoadPrefPreset::postBuild()
-{
+{ LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+ if (preferences)
+ {
+ preferences->addDependentFloater(this);
+ }
getChild<LLButton>("ok")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnOk, this));
getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this));
LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this));
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp
index 686a2f3269..bdef718d0e 100644
--- a/indra/newview/llfloatersaveprefpreset.cpp
+++ b/indra/newview/llfloatersaveprefpreset.cpp
@@ -30,6 +30,8 @@
#include "llbutton.h"
#include "llcombobox.h"
+#include "llfloaterpreference.h"
+#include "llfloaterreg.h"
#include "llnotificationsutil.h"
#include "llpresetsmanager.h"
@@ -40,7 +42,11 @@ LLFloaterSavePrefPreset::LLFloaterSavePrefPreset(const LLSD &key)
// virtual
BOOL LLFloaterSavePrefPreset::postBuild()
-{
+{ LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences");
+ if (preferences)
+ {
+ preferences->addDependentFloater(this);
+ }
getChild<LLComboBox>("preset_combo")->setTextEntryCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this));
getChild<LLComboBox>("preset_combo")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onPresetNameEdited, this));
getChild<LLButton>("save")->setCommitCallback(boost::bind(&LLFloaterSavePrefPreset::onBtnSave, this));
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 a94907f0c9..6cf9045f2a 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -31,34 +31,6 @@
(None)
</text>
- <button
- follows="top|left"
- height="23"
- label="Load preset..."
- layout="topleft"
- left_pad="5"
- name="PrefLoadButton"
- top_delta="0"
- width="115">
- <button.commit_callback
- function="Pref.PrefLoad"
- parameter="graphic"/>
- </button>
-
- <button
- follows="top|left"
- height="23"
- label="Delete preset..."
- layout="topleft"
- left_pad="5"
- name="PrefDeleteButton"
- top_delta="0"
- width="115">
- <button.commit_callback
- function="Pref.PrefDelete"
- parameter="graphic"/>
- </button>
-
<text
type="string"
length="1"
@@ -230,19 +202,6 @@
<!-- This block shows Basic Settings -->
- <button
- follows="top|left"
- height="23"
- label="Reset to recommended settings"
- layout="topleft"
- left="5"
- name="Defaults"
- top_delta="30"
- width="210">
- <button.commit_callback
- function="Pref.HardwareDefaults" />
- </button>
-
<slider
control_name="RenderFarClip"
decimal_digits="0"
@@ -303,30 +262,72 @@
<!-- End of Basic Settings block -->
<button
- follows="left|bottom"
+ follows="top|left"
height="23"
- label="Advanced Settings..."
+ label="Save settings as a preset..."
layout="topleft"
left="10"
- name="AdvancedSettings"
- top_delta="60"
+ name="PrefSaveButton"
+ top="310"
width="200">
<button.commit_callback
- function="Pref.Advanced"
- parameter="advanced" />
+ function="Pref.PrefSave"
+ parameter="graphic" />
</button>
<button
- follows="left|bottom"
+ follows="top|left"
height="23"
- label="Save settings as a preset..."
+ label="Load preset..."
+ layout="topleft"
+ left_pad="10"
+ name="PrefLoadButton"
+ top_delta="0"
+ width="115">
+ <button.commit_callback
+ function="Pref.PrefLoad"
+ parameter="graphic"/>
+ </button>
+
+ <button
+ follows="top|left"
+ height="23"
+ label="Delete preset..."
+ layout="topleft"
+ left_pad="10"
+ name="PrefDeleteButton"
+ top_delta="0"
+ width="115">
+ <button.commit_callback
+ function="Pref.PrefDelete"
+ parameter="graphic"/>
+ </button>
+
+ <button
+ follows="top|left"
+ height="23"
+ label="Reset to recommended settings"
layout="topleft"
left="10"
- name="PrefSaveButton"
- top="295"
+ name="Defaults"
+ top_delta="65"
+ width="210">
+ <button.commit_callback
+ function="Pref.HardwareDefaults" />
+ </button>
+
+ <button
+ follows="top|left"
+ height="23"
+ label="Advanced Settings..."
+ layout="topleft"
+ left_pad="10"
+ name="AdvancedSettings"
+ top_delta="0"
width="200">
<button.commit_callback
- function="Pref.PrefSave"
- parameter="graphic" />
+ function="Pref.Advanced"
+ parameter="advanced" />
</button>
+
</panel>