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 | |
parent | d10a0044320ed3fb2fffd7284e8b139d82c07214 (diff) |
EXP-1149 FIX Log in Screen: Replace the new mode selector with the old one
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanellogin.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llpanellogin.h | 3 | ||||
-rw-r--r-- | indra/newview/llstatusbar.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llstatusbar.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_login.xml | 37 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_status_bar.xml | 31 | ||||
-rw-r--r-- | indra/newview/skins/minimal/xui/en/main_view.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/minimal/xui/en/panel_login.xml | 37 | ||||
-rw-r--r-- | indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/minimal/xui/en/panel_status_bar.xml | 37 |
11 files changed, 169 insertions, 51 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index bef809f3a7..5fd0eadf16 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -154,6 +154,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, } updateLocationCombo(false); + LLUICtrl& mode_combo = getChildRef<LLUICtrl>("mode_combo");
+ mode_combo.setValue(gSavedSettings.getString("SessionSettingsFile"));
+ mode_combo.setCommitCallback(boost::bind(&LLPanelLogin::onModeChange, this, getChild<LLUICtrl>("mode_combo")->getValue(), _2));
+ LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo"); server_choice_combo->setCommitCallback(onSelectServer, NULL); server_choice_combo->setFocusLostCallback(boost::bind(onServerComboLostFocus, _1)); @@ -1021,6 +1025,32 @@ void LLPanelLogin::updateLoginPanelLinks() sInstance->getChildView("forgot_password_text")->setVisible( system_grid); } +void LLPanelLogin::onModeChange(const LLSD& original_value, const LLSD& new_value)
+{
+ if (original_value.asString() != new_value.asString())
+ {
+ LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&LLPanelLogin::onModeChangeConfirm, this, original_value, new_value, _1, _2));
+ }
+}
+
+void LLPanelLogin::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;
+ }
+} + std::string canonicalize_username(const std::string& name) { std::string cname = name; diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index b29b3af7ca..7b519df8ef 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -87,6 +87,8 @@ private: void reshapeBrowser(); void addFavoritesToStartLocation(); void addUsersWithFavoritesToUsername(); + void onModeChange(const LLSD& original_value, const LLSD& new_value);
+ void onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response);
static void onClickConnect(void*); static void onClickNewAccount(void*); static void onClickVersion(void*); @@ -97,7 +99,6 @@ private: static void onServerComboLostFocus(LLFocusableElement*); static void updateServerCombo(); static void updateStartSLURL(); - static void updateLoginPanelLinks(); private: 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() { diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 4ea3183d18..e1e1f5459b 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -92,6 +92,8 @@ private: void onMouseEnterVolume(); void onMouseEnterNearbyMedia(); void onClickScreen(S32 x, S32 y); + void onModeChange(const LLSD& original_value, const LLSD& new_value);
+ void onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response);
static void onClickMediaToggle(void* data); static void onClickBalance(void* data); diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 0bc1be666e..708f74db21 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -117,16 +117,33 @@ label="Remember password" name="connect_btn" top="35" width="90" /> - <menu_button - left_pad="5" - top="35" - width="80" - height="23" - label="Mode ▲" - name="mode_menu" - tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features." - menu_filename="menu_mode_change.xml" - /> + <text + follows="left|bottom" + font="SansSerifSmall" + height="15" + left_pad="10" + name="mode_selection_text" + top="20" + width="130"> + Mode: + </text> + <combo_box + follows="left|bottom" + height="23" + max_chars="128" + tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features." + top_pad="0" + name="mode_combo" + width="110"> + <combo_box.item + label="Basic" + name="Basic" + value="settings_minimal.xml" /> + <combo_box.item + label="Advanced" + name="Advanced" + value="" /> + </combo_box> <text follows="left|bottom" font="SansSerifSmall" diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 8a7bd53054..34237c2503 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -97,7 +97,7 @@ mouse_opaque="false" name="location_combo" top_delta="0" - width="266"> + width="246"> <combo_list mouse_wheel_opaque="true"/> <!-- *TODO: Delete. Let the location_input use the correct art sizes. @@ -137,7 +137,7 @@ name="search_combo_box" tool_tip="Search" top_delta="0" - width="200" > + width="220" > <combo_editor label="Search [SECOND_LIFE]" name="search_combo_editor"/> diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 23ad0e9528..e15b5f6943 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -35,7 +35,7 @@ </panel.string> <panel height="18" - left="-315" + left="-335" width="95" top="1" follows="right|top" @@ -77,18 +77,27 @@ top="0" width="55" /> </panel> - <menu_button - follows="right|top" - image_color="0 0 0 0" - hover_glow_amount="0" + <combo_box + follows="right|top" left_pad="5" + drop_down_button.image_color="0 0 0 0" + drop_down_button.hover_glow_amount="0" + drop_down_button.pad_right="0" top="0" - width="55" - height="18" - label="Mode ▼" + width="100" + height="20" + name="mode_combo" tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features." - menu_filename="menu_mode_change.xml" - /> + > + <combo_box.item + label="Basic Mode" + name="Basic" + value="settings_minimal.xml" /> + <combo_box.item + label="Advanced Mode" + name="Advanced" + value="" /> + </combo_box> <text type="string" font="SansSerifSmall" @@ -101,7 +110,7 @@ left_pad="5" name="TimeText" tool_tip="Current time (Pacific)" - width="90"> + width="75"> 24:00 AM PST </text> <button diff --git a/indra/newview/skins/minimal/xui/en/main_view.xml b/indra/newview/skins/minimal/xui/en/main_view.xml index ec2683880a..0ce6cbc984 100644 --- a/indra/newview/skins/minimal/xui/en/main_view.xml +++ b/indra/newview/skins/minimal/xui/en/main_view.xml @@ -187,9 +187,9 @@ name="status_bar_container" tab_stop="false" height="30" - left="-120" + left="-160" top="0" - width="120" + width="160" visible="false"/> <panel follows="top|bottom" height="500" diff --git a/indra/newview/skins/minimal/xui/en/panel_login.xml b/indra/newview/skins/minimal/xui/en/panel_login.xml index d89a0c6be1..40d2df78e1 100644 --- a/indra/newview/skins/minimal/xui/en/panel_login.xml +++ b/indra/newview/skins/minimal/xui/en/panel_login.xml @@ -118,16 +118,33 @@ label="Remember password" name="connect_btn" top="35" width="90" /> - <menu_button -left_pad="10" -top="35" -width="80" -height="23" -label="Mode ▲" -name="mode_menu" -tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features." -menu_filename="menu_mode_change.xml" - /> + <text + follows="left|bottom" + font="SansSerifSmall" + height="15" + left_pad="10" + name="mode_selection_text" + top="20" + width="130"> + Mode: + </text> + <combo_box + follows="left|bottom" + height="23" + max_chars="128" + tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features." + top_pad="0" + name="mode_combo" + width="110"> + <combo_box.item + label="Basic" + name="Basic" + value="settings_minimal.xml" /> + <combo_box.item + label="Advanced" + name="Advanced" + value="" /> + </combo_box> </layout_panel> <layout_panel tab_stop="false" diff --git a/indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml b/indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml index e50911b8d2..cb9acd4d6a 100644 --- a/indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml @@ -63,7 +63,7 @@ width="31" /> mouse_opaque="false" name="location_combo" top_delta="0" - width="390"> + width="350"> </location_input> <icon follows="right" height="20" diff --git a/indra/newview/skins/minimal/xui/en/panel_status_bar.xml b/indra/newview/skins/minimal/xui/en/panel_status_bar.xml index 42e6f30d48..874a8b47e0 100644 --- a/indra/newview/skins/minimal/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/minimal/xui/en/panel_status_bar.xml @@ -12,7 +12,7 @@ name="status" top="19" tab_stop="false" - width="120"> + width="160"> <panel.string name="packet_loss_tooltip"> Packet Loss @@ -33,18 +33,27 @@ name="buycurrencylabel"> L$ [AMT] </panel.string> - <menu_button - follows="right|top" - image_color="0 0 0 0" - hover_glow_amount="0" - left="5" - top="7" - width="55" - height="18" - label="Mode ▼" - tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features." - menu_filename="menu_mode_change.xml" - /> + <combo_box + follows="right|top" + left="5" + drop_down_button.image_color="0 0 0 0" + drop_down_button.hover_glow_amount="0" + drop_down_button.pad_right="0" + top="7" + width="95" + height="20" + name="mode_combo" + tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features." + > + <combo_box.item + label="Basic Mode" + name="Basic" + value="settings_minimal.xml" /> + <combo_box.item + label="Advanced Mode" + name="Advanced" + value="" /> + </combo_box> <button follows="right|top" height="16" @@ -53,7 +62,7 @@ image_pressed="Pause_Press" image_pressed_selected="Play_Press" is_toggle="true" - left="65" + left_pad="5" top="7" name="media_toggle_btn" tool_tip="Start/Stop All Media (Music, Video, Web pages)" |