diff options
Diffstat (limited to 'linden/indra/newview/llprefsadvanced.cpp')
-rw-r--r-- | linden/indra/newview/llprefsadvanced.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index da7b8a7..e109818 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp | |||
@@ -41,6 +41,8 @@ LLPrefsAdvanced::LLPrefsAdvanced() | |||
41 | { | 41 | { |
42 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_advanced.xml"); | 42 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_advanced.xml"); |
43 | childSetCommitCallback("speed_rez_check", onCommitCheckBox, this); | 43 | childSetCommitCallback("speed_rez_check", onCommitCheckBox, this); |
44 | |||
45 | childSetAction("reset_btn", onClickResetPrefs, this); | ||
44 | } | 46 | } |
45 | 47 | ||
46 | LLPrefsAdvanced::~LLPrefsAdvanced() | 48 | LLPrefsAdvanced::~LLPrefsAdvanced() |
@@ -145,3 +147,21 @@ void LLPrefsAdvanced::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) | |||
145 | LLPrefsAdvanced* self = (LLPrefsAdvanced*)user_data; | 147 | LLPrefsAdvanced* self = (LLPrefsAdvanced*)user_data; |
146 | self->refresh(); | 148 | self->refresh(); |
147 | } | 149 | } |
150 | |||
151 | // static | ||
152 | void LLPrefsAdvanced::onClickResetPrefs(void* user_data) | ||
153 | { | ||
154 | LLPrefsAdvanced* self = (LLPrefsAdvanced*)user_data; | ||
155 | LLNotifications::instance().add("ConfirmResetAllPreferences", LLSD(), LLSD(), boost::bind(callbackReset, _1, _2, self)); | ||
156 | } | ||
157 | |||
158 | // static | ||
159 | bool LLPrefsAdvanced::callbackReset(const LLSD& notification, const LLSD& response, LLPrefsAdvanced *self) | ||
160 | { | ||
161 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
162 | if ( option == 0 ) | ||
163 | { | ||
164 | gSavedSettings.setBOOL("ResetAllPreferences", TRUE); | ||
165 | } | ||
166 | return false; | ||
167 | } | ||