diff options
author | Richard Linden <none@none> | 2011-08-30 13:40:20 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-08-30 13:40:20 -0700 |
commit | e2d8a2ca60d0c642c8e92ea594b07c16761aecd8 (patch) | |
tree | 7ca8ac2963aa9e4888395e16e4994ed7188e8b97 /indra/newview/llstatusbar.cpp | |
parent | 64b000a822628eb9523dae57f63d6b75ee474b50 (diff) |
EXP-1079 FIX "User is not logged out immediately inworld when selecting to change modes and restart while logged in"
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r-- | indra/newview/llstatusbar.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index f7fb370720..0a00885843 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -235,38 +235,38 @@ BOOL LLStatusBar::postBuild() mScriptOut = getChildView("scriptout"); - LLUICtrl& mode_combo = getChildRef<LLUICtrl>("mode_combo");
- mode_combo.setValue(gSavedSettings.getString("SessionSettingsFile"));
- mode_combo.setCommitCallback(boost::bind(&LLStatusBar::onModeChange, this, getChild<LLUICtrl>("mode_combo")->getValue(), _2));
+ LLUICtrl& mode_combo = getChildRef<LLUICtrl>("mode_combo"); + mode_combo.setValue(gSavedSettings.getString("SessionSettingsFile")); + mode_combo.setCommitCallback(boost::bind(&LLStatusBar::onModeChange, this, getChild<LLUICtrl>("mode_combo")->getValue(), _2)); return TRUE; } -void LLStatusBar::onModeChange(const LLSD& original_value, const LLSD& new_value)
-{
- if (original_value.asString() != new_value.asString())
- {
- LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&LLStatusBar::onModeChangeConfirm, this, original_value, new_value, _1, _2));
- }
-}
-
-void LLStatusBar::onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- switch (option)
- {
- case 0:
- gSavedSettings.getControl("SessionSettingsFile")->set(new_value);
- LLAppViewer::instance()->forceQuit();
- break;
- case 1:
- // revert to original value
- getChild<LLUICtrl>("mode_combo")->setValue(original_value);
- break;
- default:
- break;
- }
+void LLStatusBar::onModeChange(const LLSD& original_value, const LLSD& new_value) +{ + if (original_value.asString() != new_value.asString()) + { + LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&LLStatusBar::onModeChangeConfirm, this, original_value, new_value, _1, _2)); + } +} + +void LLStatusBar::onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + switch (option) + { + case 0: + gSavedSettings.getControl("SessionSettingsFile")->set(new_value); + LLAppViewer::instance()->requestQuit(); + break; + case 1: + // revert to original value + getChild<LLUICtrl>("mode_combo")->setValue(original_value); + break; + default: + break; + } } // Per-frame updates of visibility |