merge
commit
d1fefdefd3
|
|
@ -35,9 +35,16 @@
|
|||
|
||||
static LLDefaultChildRegistry::Register<LLMenuButton> r("menu_button");
|
||||
|
||||
void LLMenuButton::MenuPositions::declareValues()
|
||||
{
|
||||
declare("topleft", MP_TOP_LEFT);
|
||||
declare("topright", MP_TOP_RIGHT);
|
||||
declare("bottomleft", MP_BOTTOM_LEFT);
|
||||
}
|
||||
|
||||
LLMenuButton::Params::Params()
|
||||
: menu_filename("menu_filename")
|
||||
: menu_filename("menu_filename"),
|
||||
position("position", MP_BOTTOM_LEFT)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +52,7 @@ LLMenuButton::Params::Params()
|
|||
LLMenuButton::LLMenuButton(const LLMenuButton::Params& p)
|
||||
: LLButton(p),
|
||||
mIsMenuShown(false),
|
||||
mMenuPosition(MP_BOTTOM_LEFT)
|
||||
mMenuPosition(p.position)
|
||||
{
|
||||
std::string menu_filename = p.menu_filename;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,21 +35,30 @@ class LLMenuButton
|
|||
: public LLButton
|
||||
{
|
||||
public:
|
||||
struct Params
|
||||
: public LLInitParam::Block<Params, LLButton::Params>
|
||||
{
|
||||
// filename for it's toggleable menu
|
||||
Optional<std::string> menu_filename;
|
||||
|
||||
Params();
|
||||
};
|
||||
|
||||
typedef enum e_menu_position
|
||||
{
|
||||
MP_TOP_LEFT,
|
||||
MP_TOP_RIGHT,
|
||||
MP_BOTTOM_LEFT
|
||||
} EMenuPosition;
|
||||
|
||||
struct MenuPositions
|
||||
: public LLInitParam::TypeValuesHelper<EMenuPosition, MenuPositions>
|
||||
{
|
||||
static void declareValues();
|
||||
};
|
||||
|
||||
struct Params
|
||||
: public LLInitParam::Block<Params, LLButton::Params>
|
||||
{
|
||||
// filename for it's toggleable menu
|
||||
Optional<std::string> menu_filename;
|
||||
Optional<EMenuPosition> position;
|
||||
|
||||
Params();
|
||||
};
|
||||
|
||||
|
||||
|
||||
boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb );
|
||||
|
||||
|
|
|
|||
|
|
@ -154,10 +154,6 @@ 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));
|
||||
|
|
@ -1025,32 +1021,6 @@ 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;
|
||||
|
|
|
|||
|
|
@ -97,8 +97,6 @@ private:
|
|||
static void onServerComboLostFocus(LLFocusableElement*);
|
||||
static void updateServerCombo();
|
||||
static void updateStartSLURL();
|
||||
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 updateLoginPanelLinks();
|
||||
|
||||
|
|
|
|||
|
|
@ -720,7 +720,13 @@ bool idle_startup()
|
|||
|
||||
timeout_count = 0;
|
||||
|
||||
initialize_edit_menu();
|
||||
// Login screen needs menus for preferences, but we can enter
|
||||
// this startup phase more than once.
|
||||
if (gLoginMenuBarView == NULL)
|
||||
{
|
||||
initialize_edit_menu();
|
||||
init_menus();
|
||||
}
|
||||
|
||||
if (show_connect_box)
|
||||
{
|
||||
|
|
@ -755,19 +761,6 @@ bool idle_startup()
|
|||
LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
|
||||
}
|
||||
|
||||
// *NOTE: This is where LLViewerParcelMgr::getInstance() used to get allocated before becoming LLViewerParcelMgr::getInstance().
|
||||
|
||||
// *NOTE: This is where gHUDManager used to bet allocated before becoming LLHUDManager::getInstance().
|
||||
|
||||
// *NOTE: This is where gMuteList used to get allocated before becoming LLMuteList::getInstance().
|
||||
|
||||
// Login screen needs menus for preferences, but we can enter
|
||||
// this startup phase more than once.
|
||||
if (gLoginMenuBarView == NULL)
|
||||
{
|
||||
init_menus();
|
||||
}
|
||||
|
||||
gViewerWindow->setNormalControlsVisible( FALSE );
|
||||
gLoginMenuBarView->setVisible( TRUE );
|
||||
gLoginMenuBarView->setEnabled( TRUE );
|
||||
|
|
|
|||
|
|
@ -831,7 +831,8 @@ U32 feature_from_string(std::string feature)
|
|||
};
|
||||
|
||||
|
||||
class LLAdvancedToggleFeature : public view_listener_t{
|
||||
class LLAdvancedToggleFeature : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
U32 feature = feature_from_string( userdata.asString() );
|
||||
|
|
@ -844,18 +845,19 @@ class LLAdvancedToggleFeature : public view_listener_t{
|
|||
};
|
||||
|
||||
class LLAdvancedCheckFeature : public view_listener_t
|
||||
{bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
U32 feature = feature_from_string( userdata.asString() );
|
||||
bool new_value = false;
|
||||
|
||||
if ( feature != 0 )
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
new_value = LLPipeline::toggleRenderDebugFeatureControl( (void*)feature );
|
||||
}
|
||||
U32 feature = feature_from_string( userdata.asString() );
|
||||
bool new_value = false;
|
||||
|
||||
return new_value;
|
||||
}
|
||||
if ( feature != 0 )
|
||||
{
|
||||
new_value = LLPipeline::toggleRenderDebugFeatureControl( (void*)feature );
|
||||
}
|
||||
|
||||
return new_value;
|
||||
}
|
||||
};
|
||||
|
||||
void toggle_destination_and_avatar_picker(const LLSD& show)
|
||||
|
|
@ -7774,6 +7776,55 @@ class LLToggleUIHints : public view_listener_t
|
|||
}
|
||||
};
|
||||
|
||||
class LLCheckSessionsSettings : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
std::string expected = userdata.asString();
|
||||
return gSavedSettings.getString("SessionSettingsFile") == expected;
|
||||
}
|
||||
};
|
||||
|
||||
class LLChangeMode : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
std::string mode = userdata.asString();
|
||||
if (mode == "basic")
|
||||
{
|
||||
if (gSavedSettings.getString("SessionSettingsFile") != "settings_minimal.xml")
|
||||
{
|
||||
LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(onModeChangeConfirm, "settings_minimal.xml", _1, _2));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (mode == "advanced")
|
||||
{
|
||||
if (gSavedSettings.getString("SessionSettingsFile") != "")
|
||||
{
|
||||
LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(onModeChangeConfirm, "", _1, _2));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void onModeChangeConfirm(const std::string& new_session_settings_file, const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
switch (option)
|
||||
{
|
||||
case 0:
|
||||
gSavedSettings.getControl("SessionSettingsFile")->set(new_session_settings_file);
|
||||
LLAppViewer::instance()->forceQuit();
|
||||
break;
|
||||
case 1:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void LLUploadCostCalculator::calculateCost()
|
||||
{
|
||||
S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
|
||||
|
|
@ -8263,6 +8314,8 @@ void initialize_menus()
|
|||
view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
|
||||
|
||||
view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints");
|
||||
view_listener_t::addMenu(new LLCheckSessionsSettings(), "CheckSessionSettings");
|
||||
view_listener_t::addMenu(new LLChangeMode(), "ChangeMode");
|
||||
|
||||
commit.add("Destination.show", boost::bind(&toggle_destination_and_avatar_picker, 0));
|
||||
commit.add("Avatar.show", boost::bind(&toggle_destination_and_avatar_picker, 1));
|
||||
|
|
|
|||
|
|
@ -117,33 +117,16 @@ label="Remember password"
|
|||
name="connect_btn"
|
||||
top="35"
|
||||
width="90" />
|
||||
<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"
|
||||
<menu_button
|
||||
left_pad="5"
|
||||
top="35"
|
||||
width="80"
|
||||
height="23"
|
||||
max_chars="128"
|
||||
label="Mode ▲"
|
||||
name="mode_menu"
|
||||
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>
|
||||
menu_filename="menu_mode_change.xml"
|
||||
/>
|
||||
<text
|
||||
follows="left|bottom"
|
||||
font="SansSerifSmall"
|
||||
|
|
|
|||
|
|
@ -77,6 +77,17 @@
|
|||
top="0"
|
||||
width="55" />
|
||||
</panel>
|
||||
<menu_button
|
||||
image_color="0 0 0 0"
|
||||
hover_glow_amount="0"
|
||||
left_pad="2"
|
||||
top="0"
|
||||
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"
|
||||
/>
|
||||
<text
|
||||
type="string"
|
||||
font="SansSerifSmall"
|
||||
|
|
@ -89,7 +100,7 @@
|
|||
left_pad="0"
|
||||
name="TimeText"
|
||||
tool_tip="Current time (Pacific)"
|
||||
width="145">
|
||||
width="70">
|
||||
24:00 AM PST
|
||||
</text>
|
||||
<button
|
||||
|
|
|
|||
|
|
@ -187,9 +187,9 @@
|
|||
name="status_bar_container"
|
||||
tab_stop="false"
|
||||
height="30"
|
||||
left="-70"
|
||||
left="-120"
|
||||
top="0"
|
||||
width="70"
|
||||
width="120"
|
||||
visible="false"/>
|
||||
<panel follows="top|bottom"
|
||||
height="500"
|
||||
|
|
|
|||
|
|
@ -118,33 +118,16 @@ label="Remember password"
|
|||
name="connect_btn"
|
||||
top="35"
|
||||
width="90" />
|
||||
<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"
|
||||
top_pad="0"
|
||||
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
|
||||
name="mode_combo"
|
||||
width="120">
|
||||
<combo_box.item
|
||||
label="Basic"
|
||||
name="Basic"
|
||||
value="settings_minimal.xml" />
|
||||
<combo_box.item
|
||||
label="Advanced"
|
||||
name="Advanced"
|
||||
value="" />
|
||||
</combo_box>
|
||||
<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"
|
||||
/>
|
||||
</layout_panel>
|
||||
<layout_panel
|
||||
tab_stop="false"
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ width="31" />
|
|||
mouse_opaque="false"
|
||||
name="location_combo"
|
||||
top_delta="0"
|
||||
width="440">
|
||||
width="390">
|
||||
</location_input>
|
||||
<icon follows="right"
|
||||
height="20"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
name="status"
|
||||
top="19"
|
||||
tab_stop="false"
|
||||
width="70">
|
||||
width="120">
|
||||
<panel.string
|
||||
name="packet_loss_tooltip">
|
||||
Packet Loss
|
||||
|
|
@ -33,6 +33,17 @@
|
|||
name="buycurrencylabel">
|
||||
L$ [AMT]
|
||||
</panel.string>
|
||||
<menu_button
|
||||
image_color="0 0 0 0"
|
||||
hover_glow_amount="0"
|
||||
left="2"
|
||||
top="7"
|
||||
width="50"
|
||||
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"
|
||||
/>
|
||||
<button
|
||||
follows="right|top"
|
||||
height="16"
|
||||
|
|
@ -41,7 +52,7 @@
|
|||
image_pressed="Pause_Press"
|
||||
image_pressed_selected="Play_Press"
|
||||
is_toggle="true"
|
||||
left="15"
|
||||
left="65"
|
||||
top="7"
|
||||
name="media_toggle_btn"
|
||||
tool_tip="Start/Stop All Media (Music, Video, Web pages)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue