summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellogin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r--indra/newview/llpanellogin.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 144839b554..4b23e63f12 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -211,7 +211,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
}
#if !USE_VIEWER_AUTH
- childSetPrevalidate("username_edit", LLTextValidate::validateASCIIPrintableNoPipe);
+ getChild<LLLineEditor>("username_edit")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this);
// change z sort of clickable text to be behind buttons
@@ -441,8 +441,8 @@ void LLPanelLogin::giveFocus()
if( sInstance )
{
// Grab focus and move cursor to first blank input field
- std::string username = sInstance->childGetText("username_edit");
- std::string pass = sInstance->childGetText("password_edit");
+ std::string username = sInstance->getChild<LLUICtrl>("username_edit")->getValue().asString();
+ std::string pass = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
BOOL have_username = !username.empty();
BOOL have_pass = !pass.empty();
@@ -472,7 +472,7 @@ void LLPanelLogin::giveFocus()
// static
void LLPanelLogin::showLoginWidgets()
{
- sInstance->childSetVisible("login_widgets", true);
+ sInstance->getChildView("login_widgets")->setVisible( true);
LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html");
sInstance->reshapeBrowser();
// *TODO: Append all the usual login parameters, like first_login=Y etc.
@@ -514,16 +514,16 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential,
LLSD identifier = credential->getIdentifier();
if((std::string)identifier["type"] == "agent")
{
- sInstance->childSetText("username_edit", (std::string)identifier["first_name"] + " " +
+ sInstance->getChild<LLUICtrl>("username_edit")->setValue((std::string)identifier["first_name"] + " " +
(std::string)identifier["last_name"]);
}
else if((std::string)identifier["type"] == "account")
{
- sInstance->childSetText("username_edit", (std::string)identifier["account_name"]);
+ sInstance->getChild<LLUICtrl>("username_edit")->setValue((std::string)identifier["account_name"]);
}
else
{
- sInstance->childSetText("username_edit", std::string());
+ sInstance->getChild<LLUICtrl>("username_edit")->setValue(std::string());
}
// if the password exists in the credential, set the password field with
// a filler to get some stars
@@ -539,13 +539,13 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential,
// fill it with MAX_PASSWORD characters so we get a
// nice row of asterixes.
const std::string filler("123456789!123456");
- sInstance->childSetText("password_edit", std::string("123456789!123456"));
+ sInstance->getChild<LLUICtrl>("password_edit")->setValue(std::string("123456789!123456"));
}
else
{
- sInstance->childSetText("password_edit", std::string());
+ sInstance->getChild<LLUICtrl>("password_edit")->setValue(std::string());
}
- sInstance->childSetValue("remember_check", remember);
+ sInstance->getChild<LLUICtrl>("remember_check")->setValue(remember);
}
@@ -572,9 +572,9 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
authenticator = credential->getAuthenticator();
}
- std::string username = sInstance->childGetText("username_edit");
+ std::string username = sInstance->getChild<LLUICtrl>("username_edit")->getValue().asString();
LLStringUtil::trim(username);
- std::string password = sInstance->childGetText("password_edit");
+ std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
LL_INFOS2("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL;
// determine if the username is a first/last form or not.
@@ -621,7 +621,7 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
}
}
credential = gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator);
- remember = sInstance->childGetValue("remember_check");
+ remember = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
}
// static
@@ -649,9 +649,9 @@ BOOL LLPanelLogin::areCredentialFieldsDirty()
}
else
{
- std::string username = sInstance->childGetText("username_edit");
+ std::string username = sInstance->getChild<LLUICtrl>("username_edit")->getValue().asString();
LLStringUtil::trim(username);
- std::string password = sInstance->childGetText("password_edit");
+ std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
LLLineEditor* ctrl = sInstance->getChild<LLLineEditor>("username_edit");
if(ctrl && ctrl->isDirty())
{
@@ -699,12 +699,12 @@ void LLPanelLogin::updateLocationCombo( bool force_visible )
if ( ! force_visible )
show_start = gSavedSettings.getBOOL("ShowStartLocation");
- sInstance->childSetVisible("start_location_combo", show_start);
- sInstance->childSetVisible("start_location_text", show_start);
+ sInstance->getChildView("start_location_combo")->setVisible( show_start);
+ sInstance->getChildView("start_location_text")->setVisible( show_start);
BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid");
- sInstance->childSetVisible("server_combo_text", show_server);
- sInstance->childSetVisible("server_combo", show_server);
+ sInstance->getChildView("server_combo_text")->setVisible( show_server);
+ sInstance->getChildView("server_combo")->setVisible( show_server);
}
// static
@@ -964,7 +964,7 @@ void LLPanelLogin::onClickConnect(void *)
return;
}
updateStartSLURL();
- std::string username = sInstance->childGetText("username_edit");
+ std::string username = sInstance->getChild<LLUICtrl>("username_edit")->getValue().asString();
if(username.empty())
@@ -1079,7 +1079,7 @@ void LLPanelLogin::updateServer()
if(sInstance && !sInstance->areCredentialFieldsDirty())
{
LLPointer<LLCredential> credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid());
- bool remember = sInstance->childGetValue("remember_check");
+ bool remember = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
sInstance->setFields(credential, remember);
}
// grid changed so show new splash screen (possibly)
@@ -1173,6 +1173,6 @@ void LLPanelLogin::updateLoginPanelLinks()
// need to call through sInstance, as it's called from onSelectServer, which
// is static.
- sInstance->childSetVisible("create_new_account_text", system_grid);
- sInstance->childSetVisible("forgot_password_text", system_grid);
+ sInstance->getChildView("create_new_account_text")->setVisible( system_grid);
+ sInstance->getChildView("forgot_password_text")->setVisible( system_grid);
}