SL-9699 Field should be populated as long as there is data, regardless of 'remember password'
parent
db344c5844
commit
f9fdae6778
|
|
@ -554,12 +554,12 @@ void LLPanelLogin::populateFields(LLPointer<LLCredential> credential, bool remem
|
|||
if (sInstance->mFirstLoginThisInstall)
|
||||
{
|
||||
// no list to populate
|
||||
setFields(credential, remember_psswrd);
|
||||
setFields(credential);
|
||||
}
|
||||
else
|
||||
{
|
||||
sInstance->getChild<LLUICtrl>("remember_name")->setValue(remember_user);
|
||||
sInstance->populateUserList(credential, remember_psswrd);
|
||||
sInstance->populateUserList(credential);
|
||||
remember_check->setEnabled(remember_user);
|
||||
}
|
||||
}
|
||||
|
|
@ -580,16 +580,13 @@ void LLPanelLogin::resetFields()
|
|||
}
|
||||
else
|
||||
{
|
||||
LLUICtrl* remember_check = sInstance->getChild<LLUICtrl>("remember_check");
|
||||
bool remember_psswrd = remember_check->getValue();
|
||||
LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid());
|
||||
sInstance->populateUserList(cred, remember_psswrd);
|
||||
sInstance->populateUserList(cred);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelLogin::setFields(LLPointer<LLCredential> credential,
|
||||
bool remember_psswrd)
|
||||
void LLPanelLogin::setFields(LLPointer<LLCredential> credential)
|
||||
{
|
||||
if (!sInstance)
|
||||
{
|
||||
|
|
@ -631,7 +628,7 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential,
|
|||
LL_INFOS("Credentials") << "Setting authenticator field " << authenticator["type"].asString() << LL_ENDL;
|
||||
if(authenticator.isMap() &&
|
||||
authenticator.has("secret") &&
|
||||
(authenticator["secret"].asString().size() > 0) && remember_psswrd)
|
||||
(authenticator["secret"].asString().size() > 0))
|
||||
{
|
||||
|
||||
// This is a MD5 hex digest of a password.
|
||||
|
|
@ -1096,8 +1093,7 @@ void LLPanelLogin::onUserListCommit(void*)
|
|||
{
|
||||
std::string user_key = username_combo->getSelectedValue();
|
||||
LLPointer<LLCredential> cred = gSecAPIHandler->loadFromCredentialMap("login_list", LLGridManager::getInstance()->getGrid(), user_key);
|
||||
bool remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
|
||||
setFields(cred, remember_psswrd);
|
||||
setFields(cred);
|
||||
sInstance->mPasswordModified = false;
|
||||
}
|
||||
else
|
||||
|
|
@ -1156,10 +1152,9 @@ void LLPanelLogin::updateServer()
|
|||
if(!sInstance->areCredentialFieldsDirty())
|
||||
{
|
||||
// populate dropbox and setFields
|
||||
bool remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
|
||||
// Note: following call is related to initializeLoginInfo()
|
||||
LLPointer<LLCredential> credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid());
|
||||
sInstance->populateUserList(credential, remember_psswrd);
|
||||
sInstance->populateUserList(credential);
|
||||
}
|
||||
|
||||
// update the login panel links
|
||||
|
|
@ -1198,7 +1193,7 @@ void LLPanelLogin::updateLoginButtons()
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential, bool remember_psswrd)
|
||||
void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
|
||||
{
|
||||
LLComboBox* user_combo = getChild<LLComboBox>("username_combo");
|
||||
user_combo->removeall();
|
||||
|
|
@ -1228,7 +1223,7 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential, bool rem
|
|||
}
|
||||
else
|
||||
{
|
||||
setFields(credential, remember_psswrd);
|
||||
setFields(credential);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1236,7 +1231,7 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential, bool rem
|
|||
if (credential.notNull())
|
||||
{
|
||||
user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE);
|
||||
setFields(credential, remember_psswrd);
|
||||
setFields(credential);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ private:
|
|||
void onSelectServer();
|
||||
void onLocationSLURL();
|
||||
|
||||
static void setFields(LLPointer<LLCredential> credential, bool remember_psswrd);
|
||||
static void setFields(LLPointer<LLCredential> credential);
|
||||
|
||||
static void onClickConnect(void*);
|
||||
static void onClickNewAccount(void*);
|
||||
|
|
@ -113,7 +113,7 @@ private:
|
|||
boost::scoped_ptr<LLPanelLoginListener> mListener;
|
||||
|
||||
void updateLoginButtons();
|
||||
void populateUserList(LLPointer<LLCredential> credential, bool remember_psswrd);
|
||||
void populateUserList(LLPointer<LLCredential> credential);
|
||||
|
||||
void (*mCallback)(S32 option, void *userdata);
|
||||
void* mCallbackData;
|
||||
|
|
|
|||
Loading…
Reference in New Issue