From f8a3eb551f1f546dfb1b887c98a8eab80d322003 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 5 Mar 2014 14:48:50 -0800 Subject: WENG-1470 (Partial) Secondlife Login Screen Redesign - steady progress --- indra/newview/app_settings/settings.xml | 11 ++++++++++ .../newview/app_settings/settings_per_account.xml | 2 +- indra/newview/llpanellogin.cpp | 25 ++++++++++++++++------ 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2e8d289148..8c57b70e20 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4171,6 +4171,17 @@ Value 255 + ForceLoginURL + + Comment + Force a specified URL for login page content - used if exists + Persist + 1 + Type + String + Value + + ForceShowGrid Comment diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 500151c935..fc6f1f6395 100755 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -312,7 +312,7 @@ Type Boolean Value - 0 + 1 diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 6af0cac864..7a6a9309a0 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -272,7 +272,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, childSetAction("connect_favorite_btn", onClickConnectFavorite, this); childSetAction("connect_location_btn", onClickConnectLocation, this); - getChild("links_login_panel")->setDefaultBtn("connect_btn"); + setDefaultBtn("connect_btn"); std::string channel = LLVersionInfo::getChannel(); std::string version = llformat("%s (%d)", @@ -626,11 +626,12 @@ void LLPanelLogin::updateLocationSelectorsVisibility() { if (sInstance) { - BOOL show_start = gSavedSettings.getBOOL("ShowStartLocation"); - sInstance->getChild("start_location_panel")->setVisible(show_start); - BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid"); - sInstance->getChild("grid_panel")->setVisible(show_server); + LLComboBox* server_combo = sInstance->getChild("server_combo"); + if ( server_combo ) + { + server_combo->setVisible(show_server); + } } } @@ -754,6 +755,13 @@ void LLPanelLogin::loadLoginPage() LL_DEBUGS("AppInit") << "login_page: " << login_page << LL_ENDL; + // allow users (testers really) to specify a different login content URL + std::string force_login_url = gSavedSettings.getString("ForceLoginURL"); + if ( force_login_url.length() ) + { + login_page = LLURI(force_login_url); + } + // Language params["lang"] = LLUI::getLanguage(); @@ -791,7 +799,7 @@ void LLPanelLogin::loadLoginPage() LLMediaCtrl* web_browser = sInstance->getChild("login_html"); if (web_browser->getCurrentNavUrl() != login_uri.asString()) { - LL_DEBUGS("AppInit") << "loading: " << login_uri << LL_ENDL; + llinfos << "login page loading: " << login_uri << llendl; web_browser->navigateTo( login_uri.asString(), "text/html" ); } } @@ -823,6 +831,11 @@ void LLPanelLogin::onClickConnectFavorite(void *) void LLPanelLogin::onClickConnectLocation(void *) { + std::string location = sInstance->getChild("location_edit")->getValue().asString(); + LLStartUp::setStartSLURL(location); + + void* unused_parameter = 0; + LLPanelLogin::sInstance->onClickConnect(unused_parameter); } // static -- cgit v1.2.3