diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-08-26 18:28:58 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-08-26 18:28:58 -0700 |
commit | 0af17d6e8e9cbbe5e1acb7aed8f296db55522c44 (patch) | |
tree | f6ba916042b358e2a84189a46f4685ec750bee8d /indra/newview/llstatusbar.cpp | |
parent | d10a0044320ed3fb2fffd7284e8b139d82c07214 (diff) |
EXP-1149 FIX Log in Screen: Replace the new mode selector with the old one
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r-- | indra/newview/llstatusbar.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 1b8be7a5b2..f7fb370720 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -162,6 +162,8 @@ BOOL LLStatusBar::handleRightMouseDown(S32 x, S32 y, MASK mask) BOOL LLStatusBar::postBuild() { + LLControlVariablePtr mode_control = gSavedSettings.getControl("SessionSettingsFile"); + gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3)); mTextTime = getChild<LLTextBox>("TimeText" ); @@ -233,9 +235,40 @@ 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));
+ + 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;
+ }
+} + // Per-frame updates of visibility void LLStatusBar::refresh() { |