diff options
author | McCabe Maxsted | 2011-03-23 19:45:04 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-03-23 19:45:04 -0700 |
commit | 75e6222d5fe23bfbf9a02bf4a6969ac25b8ceac1 (patch) | |
tree | c5bd538b57712320c354f3eb1567aabbdf13f85b /linden | |
parent | Merge remote-tracking branch 'armin/exp' into exp (diff) | |
download | meta-impy-75e6222d5fe23bfbf9a02bf4a6969ac25b8ceac1.zip meta-impy-75e6222d5fe23bfbf9a02bf4a6969ac25b8ceac1.tar.gz meta-impy-75e6222d5fe23bfbf9a02bf4a6969ac25b8ceac1.tar.bz2 meta-impy-75e6222d5fe23bfbf9a02bf4a6969ac25b8ceac1.tar.xz |
Moved 'Reset all preferences to default' button to a more logical place: in the main preferences window
Diffstat (limited to 'linden')
6 files changed, 27 insertions, 27 deletions
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*) | |||
456 | } | 456 | } |
457 | 457 | ||
458 | 458 | ||
459 | // static | ||
460 | void LLFloaterPreference::onClickResetPrefs(void* user_data) | ||
461 | { | ||
462 | LLFloaterPreference* self = (LLFloaterPreference*)user_data; | ||
463 | LLNotifications::instance().add("ConfirmResetAllPreferences", LLSD(), LLSD(), boost::bind(callbackReset, _1, _2, self)); | ||
464 | } | ||
465 | |||
466 | // static | ||
467 | bool LLFloaterPreference::callbackReset(const LLSD& notification, const LLSD& response, LLFloaterPreference *self) | ||
468 | { | ||
469 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
470 | if ( option == 0 ) | ||
471 | { | ||
472 | gSavedSettings.setBOOL("ResetAllPreferences", TRUE); | ||
473 | } | ||
474 | return false; | ||
475 | } | ||
476 | |||
477 | |||
459 | // static | 478 | // static |
460 | void LLFloaterPreference::onBtnOK( void* userdata ) | 479 | void LLFloaterPreference::onBtnOK( void* userdata ) |
461 | { | 480 | { |
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: | |||
133 | static void onBtnCancel(void*); | 133 | static void onBtnCancel(void*); |
134 | static void onBtnApply(void*); | 134 | static void onBtnApply(void*); |
135 | 135 | ||
136 | static void onClickResetPrefs(void* user_data); | ||
137 | static bool callbackReset(const LLSD& notification, const LLSD& response, LLFloaterPreference* self); | ||
138 | |||
136 | static LLFloaterPreference* sInstance; | 139 | static LLFloaterPreference* sInstance; |
137 | }; | 140 | }; |
138 | 141 | ||
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() | |||
58 | childSetCommitCallback("speed_rez_check", onCommitCheckBox, this); | 58 | childSetCommitCallback("speed_rez_check", onCommitCheckBox, this); |
59 | childSetCommitCallback("command_line_check", onCommitCheckBox, this); | 59 | childSetCommitCallback("command_line_check", onCommitCheckBox, this); |
60 | 60 | ||
61 | childSetAction("reset_btn", onClickResetPrefs, this); | ||
62 | childSetAction("command_line_btn", onClickCommandLine, this); | 61 | childSetAction("command_line_btn", onClickCommandLine, this); |
63 | } | 62 | } |
64 | 63 | ||
@@ -274,24 +273,6 @@ void LLPrefsAdvanced::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) | |||
274 | self->refresh(); | 273 | self->refresh(); |
275 | } | 274 | } |
276 | 275 | ||
277 | // static | ||
278 | void LLPrefsAdvanced::onClickResetPrefs(void* user_data) | ||
279 | { | ||
280 | LLPrefsAdvanced* self = (LLPrefsAdvanced*)user_data; | ||
281 | LLNotifications::instance().add("ConfirmResetAllPreferences", LLSD(), LLSD(), boost::bind(callbackReset, _1, _2, self)); | ||
282 | } | ||
283 | |||
284 | // static | ||
285 | bool LLPrefsAdvanced::callbackReset(const LLSD& notification, const LLSD& response, LLPrefsAdvanced *self) | ||
286 | { | ||
287 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
288 | if ( option == 0 ) | ||
289 | { | ||
290 | gSavedSettings.setBOOL("ResetAllPreferences", TRUE); | ||
291 | } | ||
292 | return false; | ||
293 | } | ||
294 | |||
295 | void LLPrefsAdvanced::onSpellAdd(void* data) | 276 | void LLPrefsAdvanced::onSpellAdd(void* data) |
296 | { | 277 | { |
297 | LLPrefsAdvanced* panel = (LLPrefsAdvanced*)data; | 278 | 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: | |||
50 | static LLPrefsAdvanced* sInstance; | 50 | static LLPrefsAdvanced* sInstance; |
51 | 51 | ||
52 | static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); | 52 | static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); |
53 | static void onClickResetPrefs(void* user_data); | ||
54 | static void onClickCommandLine(void* data); | 53 | static void onClickCommandLine(void* data); |
55 | 54 | ||
56 | static bool callbackReset(const LLSD& notification, const LLSD& response, LLPrefsAdvanced *self); | ||
57 | |||
58 | static void onSpellAdd(void* data); | 55 | static void onSpellAdd(void* data); |
59 | static void onSpellRemove(void* data); | 56 | static void onSpellRemove(void* data); |
60 | static void onSpellGetMore(void* data); | 57 | 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 @@ | |||
18 | halign="center" height="20" | 18 | halign="center" height="20" |
19 | help_url="http://support.imprudenceviewer.org/" | 19 | help_url="http://support.imprudenceviewer.org/" |
20 | label="Support" left="9" mouse_opaque="true" | 20 | label="Support" left="9" mouse_opaque="true" |
21 | name="Support" scale_image="true" width="100" /> | 21 | name="Support" scale_image="true" width="90" /> |
22 | <tab_container bottom="-476" enabled="true" follows="left|top|right|bottom" height="455" | 22 | <button bottom_delta="0" follows="left|bottom" font="SansSerif" height="20" width="160" |
23 | label="Reset All To Default" name="reset_btn" left_delta="95" | ||
24 | tool_tip="Reset all preferences to their default values (requires a restart)" /> | ||
25 | <tab_container bottom="-476" enabled="true" follows="left|top|right|bottom" height="455" | ||
23 | left="0" mouse_opaque="false" name="pref core" tab_group="1" | 26 | left="0" mouse_opaque="false" name="pref core" tab_group="1" |
24 | tab_position="left" tab_width="120" width="620" /> | 27 | tab_position="left" tab_width="120" width="620" /> |
25 | </floater> | 28 | </floater> |
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 @@ | |||
128 | </combo_item> | 128 | </combo_item> |
129 | </combo_box>--> | 129 | </combo_box>--> |
130 | 130 | ||
131 | <button bottom="10" follows="left|bottom" font="SansSerif" height="20" width="250" | ||
132 | label="Reset All Preferences To Default" name="reset_btn" left="12" | ||
133 | tool_tip="Reset all preferences to their default values (requires a restart)" /> | ||
134 | </panel> | 131 | </panel> |
135 | 132 | ||
136 | <panel border="true" bottom="-580" follows="left|top|right|bottom" height="525" label="SpellCheck" | 133 | <panel border="true" bottom="-580" follows="left|top|right|bottom" height="525" label="SpellCheck" |