From 75e6222d5fe23bfbf9a02bf4a6969ac25b8ceac1 Mon Sep 17 00:00:00 2001
From: McCabe Maxsted
Date: Wed, 23 Mar 2011 19:45:04 -0700
Subject: Moved 'Reset all preferences to default' button to a more logical
place: in the main preferences window
---
linden/indra/newview/llfloaterpreference.cpp | 19 +++++++++++++++++++
linden/indra/newview/llfloaterpreference.h | 3 +++
linden/indra/newview/llprefsadvanced.cpp | 19 -------------------
linden/indra/newview/llprefsadvanced.h | 3 ---
.../skins/default/xui/en-us/floater_preferences.xml | 7 +++++--
.../default/xui/en-us/panel_preferences_advanced.xml | 3 ---
6 files changed, 27 insertions(+), 27 deletions(-)
(limited to 'linden')
diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp
index 0f81be6..d312cb6 100644
--- a/linden/indra/newview/llfloaterpreference.cpp
+++ b/linden/indra/newview/llfloaterpreference.cpp
@@ -456,6 +456,25 @@ void LLFloaterPreference::show(void*)
}
+// static
+void LLFloaterPreference::onClickResetPrefs(void* user_data)
+{
+ LLFloaterPreference* self = (LLFloaterPreference*)user_data;
+ LLNotifications::instance().add("ConfirmResetAllPreferences", LLSD(), LLSD(), boost::bind(callbackReset, _1, _2, self));
+}
+
+// static
+bool LLFloaterPreference::callbackReset(const LLSD& notification, const LLSD& response, LLFloaterPreference *self)
+{
+ S32 option = LLNotification::getSelectedOption(notification, response);
+ if ( option == 0 )
+ {
+ gSavedSettings.setBOOL("ResetAllPreferences", TRUE);
+ }
+ return false;
+}
+
+
// static
void LLFloaterPreference::onBtnOK( void* userdata )
{
diff --git a/linden/indra/newview/llfloaterpreference.h b/linden/indra/newview/llfloaterpreference.h
index 931c8b6..d5eccbc 100644
--- a/linden/indra/newview/llfloaterpreference.h
+++ b/linden/indra/newview/llfloaterpreference.h
@@ -133,6 +133,9 @@ protected:
static void onBtnCancel(void*);
static void onBtnApply(void*);
+ static void onClickResetPrefs(void* user_data);
+ static bool callbackReset(const LLSD& notification, const LLSD& response, LLFloaterPreference* self);
+
static LLFloaterPreference* sInstance;
};
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp
index 99bc4fd..89dc0b2 100644
--- a/linden/indra/newview/llprefsadvanced.cpp
+++ b/linden/indra/newview/llprefsadvanced.cpp
@@ -58,7 +58,6 @@ LLPrefsAdvanced::LLPrefsAdvanced()
childSetCommitCallback("speed_rez_check", onCommitCheckBox, this);
childSetCommitCallback("command_line_check", onCommitCheckBox, this);
- childSetAction("reset_btn", onClickResetPrefs, this);
childSetAction("command_line_btn", onClickCommandLine, this);
}
@@ -274,24 +273,6 @@ void LLPrefsAdvanced::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
self->refresh();
}
-// static
-void LLPrefsAdvanced::onClickResetPrefs(void* user_data)
-{
- LLPrefsAdvanced* self = (LLPrefsAdvanced*)user_data;
- LLNotifications::instance().add("ConfirmResetAllPreferences", LLSD(), LLSD(), boost::bind(callbackReset, _1, _2, self));
-}
-
-// static
-bool LLPrefsAdvanced::callbackReset(const LLSD& notification, const LLSD& response, LLPrefsAdvanced *self)
-{
- S32 option = LLNotification::getSelectedOption(notification, response);
- if ( option == 0 )
- {
- gSavedSettings.setBOOL("ResetAllPreferences", TRUE);
- }
- return false;
-}
-
void LLPrefsAdvanced::onSpellAdd(void* data)
{
LLPrefsAdvanced* panel = (LLPrefsAdvanced*)data;
diff --git a/linden/indra/newview/llprefsadvanced.h b/linden/indra/newview/llprefsadvanced.h
index 84a7854..d76e602 100644
--- a/linden/indra/newview/llprefsadvanced.h
+++ b/linden/indra/newview/llprefsadvanced.h
@@ -50,11 +50,8 @@ private:
static LLPrefsAdvanced* sInstance;
static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data);
- static void onClickResetPrefs(void* user_data);
static void onClickCommandLine(void* data);
- static bool callbackReset(const LLSD& notification, const LLSD& response, LLPrefsAdvanced *self);
-
static void onSpellAdd(void* data);
static void onSpellRemove(void* data);
static void onSpellGetMore(void* data);
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_preferences.xml b/linden/indra/newview/skins/default/xui/en-us/floater_preferences.xml
index 939a877..213147a 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_preferences.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_preferences.xml
@@ -18,8 +18,11 @@
halign="center" height="20"
help_url="http://support.imprudenceviewer.org/"
label="Support" left="9" mouse_opaque="true"
- name="Support" scale_image="true" width="100" />
-
+
+
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
index 1b771b5..b8f6e7d 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
@@ -128,9 +128,6 @@
-->
-