re-add mode settings switch at login. Added Firestorm mode, set as default when no settings file exsists

only differences between firestorm and phoenix mode is:
phoenix uses vintage skin and firestorm mode uses firestorm skin
firestorm mode has nav bar enabled by default, phoenix mode does not
Tank_Master 2012-03-06 00:56:28 -08:00
parent 1cfd458696
commit 7ab3d1ea47
14 changed files with 459 additions and 8 deletions

View File

@ -1560,6 +1560,7 @@ set(viewer_APPSETTINGS_FILES
app_settings/mid_graphics.xml
app_settings/grids.fallback.xml
app_settings/account_settings_phoenix.xml
app_settings/settings_firestorm.xml
app_settings/settings_hybrid.xml
app_settings/settings_phoenix.xml
app_settings/settings_v3.xml

View File

@ -16199,7 +16199,7 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Comment</key>
<string>Settings that are a applied per session (not saved).</string>
<key>Persist</key>
<integer>0</integer>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
@ -16210,7 +16210,7 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Comment</key>
<string>User settings that are a applied per session (not saved).</string>
<key>Persist</key>
<integer>0</integer>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>

View File

@ -0,0 +1,278 @@
<llsd>
<map>
<key>ShowNetStats</key>
<map>
<key>Comment</key>
<string>Show the Status Indicators for the Viewer and Network Usage in the Status Overlay.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowNavbarNavigationPanel</key>
<map>
<key>Comment</key>
<string>Show/Hide Navigation Bar Navigation Panel</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>OnlineOfflinetoNearbyChat</key>
<map>
<key>Comment</key>
<string>Send online/offline notifications to Nearby Chat panel (v1-style behavior)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ChatOnlineNotification</key>
<map>
<key>Comment</key>
<string>Provide notifications for when friend log on and off of SL</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>OpenSidePanelsInFloaters</key>
<map>
<key>Comment</key>
<string>Open Panels in Floaters</string>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<boolean>1</boolean>
</map>
<key>FSShowMouselookInstructions</key>
<map>
<key>Comment</key>
<string>If true, instructions about leaving Mouseview are displayed.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>SkinCurrent</key>
<map>
<key>Comment</key>
<string>The currently selected skin.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>firestorm</string>
</map>
<key>SkinCurrentTheme</key>
<map>
<key>Comment</key>
<string>The selected theme for the current skin.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>grey</string>
</map>
<key>LetterKeysFocusChatBar</key>
<map>
<key>Comment</key>
<string>When printable characters keys (possibly with Shift held) are pressed, the chat bar takes focus</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>FSColorClienttags</key>
<map>
<key>Comment</key>
<string>Color Clienttags by: 0=Off, 1=Single color per Viewer, 2=Userdefinied color (one color per UUID), 3=New Tagsystem Color </string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>2</integer>
</map>
<key>FSScriptDialogNoTransparency</key>
<map>
<key>Comment</key>
<string>If true, script dialogs will be shown opaque and ignore the floater opacity settings.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowRadarMinimap</key>
<map>
<key>Comment</key>
<string>Toggle visibility of the embedded minimap in the radar panel</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FSUseNearbyChatConsole</key>
<map>
<key>Comment</key>
<string>Display popup chat embedded into the read-only world console (v1-style) instead of overlayed floaters (v2-style)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowScriptDialogsTopRight</key>
<map>
<key>Comment</key>
<string>Show script llDialog floaters always in the top right corner of the screen.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableGroupChatPopups</key>
<map>
<key>Comment</key>
<string>Enable Incoming Group Chat Popups</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>EnableIMChatPopups</key>
<map>
<key>Comment</key>
<string>Enable Incoming IM Chat Popups</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>PlainTextChatHistory</key>
<map>
<key>Comment</key>
<string>Enable/Disable plain text chat history style</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowChatMiniIcons</key>
<map>
<key>Comment</key>
<string>Toggles the display of mini icons in chat history</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ChatWindow</key>
<map>
<key>Comment</key>
<string>Show chat in multiple windows(by default) or in one multi-tabbed window(requires restart)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>FSUseWebProfiles</key>
<map>
<key>Comment</key>
<string>Shows web profiles instead of the v1-style profile floater</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FSFolderViewItemHeight</key>
<map>
<key>Comment</key>
<string>Controls the height of folder items, for instance in inventory</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>18</integer>
</map>
<key>ShowGroupNoticesTopRight</key>
<map>
<key>Comment</key>
<string>Show group notifications to the top right corner of the screen.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>FSConsoleClassicDrawMode</key>
<map>
<key>Comment</key>
<string>Enables classic console draw mode (single background block over all lines with width of the longest line)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
</map>
</llsd>

View File

@ -68,7 +68,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>firestorm</string>
<string>vintage</string>
</map>
<key>SkinCurrentTheme</key>
@ -80,7 +80,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>grey</string>
<string>classic</string>
</map>
<key>LetterKeysFocusChatBar</key>

View File

@ -780,6 +780,7 @@ bool LLAppViewer::init()
LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "releases.xml"));
LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "client_list_v2.xml"));
LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_firestorm.xml"));
LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_phoenix.xml"));
LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_hybrid.xml"));
LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_v3.xml"));
@ -2482,7 +2483,7 @@ bool LLAppViewer::initConfiguration()
//Wolfspirit: Temporary fix for NOT loading settings_minimal.xml
if (gSavedSettings.getBOOL("FirstRunThisInstall"))
{
gSavedSettings.setString("SessionSettingsFile", "settings_phoenix.xml");
gSavedSettings.setString("SessionSettingsFile", "settings_firestorm.xml");
// Note that the "FirstRunThisInstall" settings is currently unused.
gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);

View File

@ -264,7 +264,8 @@ LLSD LLFloaterAbout::getInfo()
//[FIRE 3113 : SJ] Added Settingsfile to info
if (gSavedSettings.getString("SessionSettingsFile") == "settings_phoenix.xml") info["MODE"] = "Phoenix";
if (gSavedSettings.getString("SessionSettingsFile") == "settings_firestorm.xml") info["MODE"] = "Firestorm";
else if (gSavedSettings.getString("SessionSettingsFile") == "settings_phoenix.xml") info["MODE"] = "Phoenix";
else if (gSavedSettings.getString("SessionSettingsFile") == "settings_v3.xml") info["MODE"] = "V3";
else if (gSavedSettings.getString("SessionSettingsFile") == "settings_hybrid.xml") info["MODE"] = "Hybrid";

View File

@ -561,7 +561,15 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
//send this info to login.cgi for stats gathering
//since viewerstats isn't reliable enough
requested_options.append("advanced-mode");
if (gSavedSettings.getString("SessionSettingsFile").empty())
{
requested_options.append("advanced-mode");
}
else
{
requested_options.append("basic-mode");
//requested_options.append("inventory-basic");
}
#endif
requested_options.append("max-agent-groups");

View File

@ -163,6 +163,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLStartUp::setStartSLURL(slurl);
}
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);
LLComboBox* saved_login_choice_combo = sInstance->getChild<LLComboBox>("username_combo");
@ -1330,6 +1334,32 @@ void LLPanelLogin::updateLoginPanelLinks()
sInstance->getChildView("forgot_password_text")->setVisible( system_grid || has_password);
}
// </AW: opensim>
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()->requestQuit();
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)
{

View File

@ -89,6 +89,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*);

View File

@ -343,13 +343,44 @@ BOOL LLStatusBar::postBuild()
mParcelMgrConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
boost::bind(&LLStatusBar::onAgentParcelChange, this));
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));
if (!gSavedSettings.getBOOL("ShowNetStats"))
{
updateNetstatVisibility(LLSD(FALSE));
}
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()->requestQuit();
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()
{
@ -1155,4 +1186,4 @@ void LLStatusBar::updateNetstatVisibility(const LLSD& data)
rect = mBalancePanel->getRect();
rect.translate(NETSTAT_WIDTH * translateFactor, 0);
mBalancePanel->setRect(rect);
}
}

View File

@ -143,6 +143,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 onClickStreamToggle(void* data); // ## Zi: Media/Stream separation
static void onClickMediaToggle(void* data);

View File

@ -9216,6 +9216,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()->requestQuit();
break;
case 1:
default:
break;
}
}
};
void LLUploadCostCalculator::calculateCost()
{
S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();

View File

@ -7925,6 +7925,19 @@ You must authenticate [APP_NAME] before you can upload images to Flickr. Please
<tag>confirm</tag>
</notification>
<notification
name="ModeChange"
label=""
type="alertmodal">
<unique/>
Changing modes requires you to quit and restart.
<tag>confirm</tag>
<usetemplate
name="okcancelbuttons"
yestext="Quit"
notext="Don't Quit"/>
</notification>
<notification
name="NoClassifieds"

View File

@ -130,6 +130,41 @@ 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="110">
Default Settings:
</text>
<combo_box
follows="left|bottom"
height="23"
max_chars="128"
tool_tip="Select which style of viewer you are most familiar with to set your defaults to appropriately."
top_pad="0"
name="mode_combo"
width="110">
<combo_box.item
label="Firestorm"
name="Firestorm"
value="settings_firestorm.xml" />
<combo_box.item
label="Phoenix"
name="Phoenix"
value="settings_phoenix.xml" />
<combo_box.item
label="V3"
name="V3"
value="settings_v3.xml" />
<combo_box.item
label="Hybrid"
name="Hybrid"
value="settings_hybrid.xml" />
</combo_box>
<text
follows="left|bottom"
font="SansSerifSmall"