summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellogin.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-02-23 16:40:10 -0800
committerRichard Linden <none@none>2011-02-23 16:40:10 -0800
commitf8678c27b2dfbdba1610b0284aa978139cb72bff (patch)
tree863f94bb6e3eef41f8b8a1f60801cf63635b393e /indra/newview/llpanellogin.cpp
parent0747341f97a9aec61038de8d2bbe28e7909f5aca (diff)
SOCIAL-547 WIP Add skin selection dropdown to login screen
add confirmation dialog to mode change
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r--indra/newview/llpanellogin.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 8d3b1fd7a0..3ca61b0aab 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -214,6 +214,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
}
updateLocationCombo(false);
+ gSavedSettings.getControl("SessionSettingsFile")->getSignal()->connect(boost::bind(&onModeChange));
+
LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo");
server_choice_combo->setCommitCallback(onSelectServer, NULL);
server_choice_combo->setFocusLostCallback(boost::bind(onServerComboLostFocus, _1));
@@ -1156,3 +1158,26 @@ void LLPanelLogin::updateLoginPanelLinks()
sInstance->getChildView("create_new_account_text")->setVisible( system_grid);
sInstance->getChildView("forgot_password_text")->setVisible( system_grid);
}
+
+//static
+void LLPanelLogin::onModeChange()
+{
+ LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&onModeChangeConfirm, _1, _2));
+}
+
+//static
+void LLPanelLogin::onModeChangeConfirm(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ switch (option)
+ {
+ case 0:
+ LLAppViewer::instance()->requestQuit();
+ break;
+ case 1:
+ // do nothing
+ break;
+ default:
+ break;
+ }
+} \ No newline at end of file