From f8678c27b2dfbdba1610b0284aa978139cb72bff Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 23 Feb 2011 16:40:10 -0800 Subject: SOCIAL-547 WIP Add skin selection dropdown to login screen add confirmation dialog to mode change --- indra/newview/llpanellogin.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'indra/newview/llpanellogin.cpp') 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("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 -- cgit v1.2.3