diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanellogin.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llpanellogin.h | 2 |
2 files changed, 27 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 diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 1ef6539ecc..1430bec832 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -98,6 +98,8 @@ private: static void onServerComboLostFocus(LLFocusableElement*); static void updateServerCombo(); static void updateStartSLURL(); + static void onModeChange(); + static void onModeChangeConfirm(const LLSD& notification, const LLSD& response); static void updateLoginPanelLinks(); |