diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-11-13 12:56:07 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-11-13 12:56:07 +0200 |
commit | f9fdae67789c87ad2a6a062570236b5140ccc112 (patch) | |
tree | 6043fb677dff58064981331419b7db9c08653342 /indra/newview | |
parent | db344c5844c8f2dcb941de16e9dcdae52296dfe9 (diff) |
SL-9699 Field should be populated as long as there is data, regardless of 'remember password'
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanellogin.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llpanellogin.h | 4 |
2 files changed, 12 insertions, 17 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index d7c189271e..4f050a9748 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -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); } } } diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 3eb7b68949..c9b8e1b6fc 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -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; |