summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-09-05 17:04:44 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-09-05 17:04:44 -0400
commita372fb2851e26804ceb4e09c0266a23bd89341ee (patch)
tree264f99ccf0f6de0346c23eac61604384d1da76ec /indra/newview
parente3b4b3875a6d8c7857ba948a662ace4731913ecf (diff)
parentf346cbbdeb8502e1cb06a01a184dde7a7f53a087 (diff)
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellogin.cpp70
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml3
2 files changed, 32 insertions, 41 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 3bb3e5cf47..c6bcaeab07 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -744,63 +744,53 @@ void LLPanelLogin::setAlwaysRefresh(bool refresh)
void LLPanelLogin::loadLoginPage()
{
if (!sInstance) return;
-
- std::ostringstream oStr;
- std::string login_page = LLGridManager::getInstance()->getLoginPage();
+ LLURI login_page = LLURI(LLGridManager::getInstance()->getLoginPage());
+ LLSD params(login_page.queryMap());
- oStr << login_page;
-
- // Use the right delimeter depending on how LLURI parses the URL
- LLURI login_page_uri = LLURI(login_page);
-
- std::string first_query_delimiter = "&";
- if (login_page_uri.queryMap().size() == 0)
- {
- first_query_delimiter = "?";
- }
+ LL_DEBUGS("AppInit") << "login_page: " << login_page << LL_ENDL;
// Language
- std::string language = LLUI::getLanguage();
- oStr << first_query_delimiter<<"lang=" << language;
-
+ params["lang"] = LLUI::getLanguage();
+
// First Login?
if (gSavedSettings.getBOOL("FirstLoginThisInstall"))
{
- oStr << "&firstlogin=TRUE";
+ params["firstlogin"] = "TRUE"; // not bool: server expects string TRUE
}
// Channel and Version
- std::string version = llformat("%s (%d)",
- LLVersionInfo::getShortVersion().c_str(),
- LLVersionInfo::getBuild());
+ params["version"] = llformat("%s (%d)",
+ LLVersionInfo::getShortVersion().c_str(),
+ LLVersionInfo::getBuild());
+ params["channel"] = LLVersionInfo::getChannel();
- char* curl_channel = curl_escape(LLVersionInfo::getChannel().c_str(), 0);
- char* curl_version = curl_escape(version.c_str(), 0);
+ // Grid
+ params["grid"] = LLGridManager::getInstance()->getGridId();
- oStr << "&channel=" << curl_channel;
- oStr << "&version=" << curl_version;
+ // add OS info
+ params["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
- curl_free(curl_channel);
- curl_free(curl_version);
+ // sourceid: create_account_url's sourceid= varies by skin
+ LLURI create_account_url(LLTrans::getString("create_account_url"));
+ LLSD create_account_params(create_account_url.queryMap());
+ if (create_account_params.has("sourceid"))
+ {
+ params["sourceid"] = create_account_params["sourceid"];
+ }
+
+ // Make an LLURI with this augmented info
+ LLURI login_uri(LLURI::buildHTTP(login_page.authority(),
+ login_page.path(),
+ params));
- // Grid
- char* curl_grid = curl_escape(LLGridManager::getInstance()->getGridId().c_str(), 0);
- oStr << "&grid=" << curl_grid;
- curl_free(curl_grid);
-
- // add OS info
- char * os_info = curl_escape(LLAppViewer::instance()->getOSInfo().getOSStringSimple().c_str(), 0);
- oStr << "&os=" << os_info;
- curl_free(os_info);
-
gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid());
-
+
LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html");
- if (web_browser->getCurrentNavUrl() != oStr.str())
+ if (web_browser->getCurrentNavUrl() != login_uri.asString())
{
- LL_DEBUGS("AppInit")<<oStr.str()<<LL_ENDL;
- web_browser->navigateTo( oStr.str(), "text/html" );
+ LL_DEBUGS("AppInit") << "loading: " << login_uri << LL_ENDL;
+ web_browser->navigateTo( login_uri.asString(), "text/html" );
}
}
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 9c96143aa3..6c4cbd4627 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -31,6 +31,7 @@
width="996"/>
<layout_stack
animate="false"
+ clip="false"
follows="left|bottom|right"
name="login_widgets"
layout="topleft"
@@ -223,7 +224,7 @@
follows="right|bottom"
name="links"
width="210"
- min_width="210"
+ min_width="100"
height="80">
<text
follows="right|bottom"