diff options
| -rw-r--r-- | indra/newview/llfloaterjoin.cpp | 13 | ||||
| -rw-r--r-- | indra/newview/llpanellogin.cpp | 13 | ||||
| -rw-r--r-- | indra/newview/llpanellogin.h | 1 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_join.xml | 13 |
4 files changed, 39 insertions, 1 deletions
diff --git a/indra/newview/llfloaterjoin.cpp b/indra/newview/llfloaterjoin.cpp index 19f8e29892..3222643635 100644 --- a/indra/newview/llfloaterjoin.cpp +++ b/indra/newview/llfloaterjoin.cpp @@ -31,6 +31,7 @@ #include "llcommandhandler.h" #include "llfloaterreg.h" #include "llmediactrl.h" +#include "llpanellogin.h" #include "llui.h" #include "llviewercontrol.h" @@ -47,10 +48,18 @@ public: if (params.size() < 1) return false; - if (params[0].asString() == "close") + const std::string action = params[0].asString(); + + if (action == "close") { LLFloaterReg::hideInstance("join"); } + else if (action == "join" && params.size() >= 3) + { + LLPanelLogin::setCredentialFields(LLURI::unescape(params[1].asString()), + LLURI::unescape(params[2].asString())); + LLFloaterReg::hideInstance("join"); + } return true; } @@ -94,4 +103,6 @@ void LLFloaterJoin::onOpen(const LLSD& key) { mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); } + + centerOnScreen(); } diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 54404d8fb4..d382ef2df5 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -537,6 +537,19 @@ void LLPanelLogin::reshapePanel() } //static +void LLPanelLogin::setCredentialFields(const std::string& username, const std::string& password) +{ + if (!sInstance) + return; + sInstance->getChild<LLComboBox>("username_combo")->setLabel(username); + sInstance->mUsernameLength = static_cast<unsigned int>(username.length()); + sInstance->getChild<LLUICtrl>("password_edit")->setValue(password); + sInstance->mPasswordLength = static_cast<unsigned int>(password.length()); + sInstance->mPasswordModified = true; + sInstance->updateLoginButtons(); +} + +//static void LLPanelLogin::populateFields(LLPointer<LLCredential> credential, bool remember_user, bool remember_psswrd) { if (!sInstance) diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index a00081795e..453b645299 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -60,6 +60,7 @@ public: static void populateFields(LLPointer<LLCredential> credential, bool remember_user, bool remember_psswrd); static void resetFields(); static void getFields(LLPointer<LLCredential>& credential, bool& remember_user, bool& remember_psswrd); + static void setCredentialFields(const std::string& username, const std::string& password); static bool isCredentialSet() { return sCredentialSet; } diff --git a/indra/newview/skins/default/xui/en/floater_join.xml b/indra/newview/skins/default/xui/en/floater_join.xml index dabda77b60..45f48421f4 100644 --- a/indra/newview/skins/default/xui/en/floater_join.xml +++ b/indra/newview/skins/default/xui/en/floater_join.xml @@ -46,4 +46,17 @@ height="16"> secondlife:///app/floaterjoin/close </text> + <!-- TODO: remove when actual Join page URL is set --> + <text + follows="left|bottom" + name="test_join_link" + parse_urls="true" + font="SansSerifSmall" + text_color="White" + left="4" + top="748" + width="430" + height="16"> + secondlife:///app/floaterjoin/join/testuser/testpassword + </text> </floater> |
