EXP-1149 FIX Log in Screen: Replace the new mode selector with the old one
parent
d10a004432
commit
0af17d6e8e
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"/>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue