diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-03-28 17:41:48 +0300 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-03-28 17:41:48 +0300 |
| commit | e2aa8e17e2dc4d297d1043ed59b3f415f14751f6 (patch) | |
| tree | 6034cec18509abe0aac99d5960271fc33fff690a /indra/newview/llpanellogin.cpp | |
| parent | 952aee3f49d9591473b0bc2029dd485dd70a4132 (diff) | |
SL-17039 "Remember Password" checkbox state should be saved per account name
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
| -rw-r--r-- | indra/newview/llpanellogin.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 302ff40bbc..9df3a8e31a 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -326,6 +326,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name"); remember_name->setCommitCallback(boost::bind(&LLPanelLogin::onRememberUserCheck, this)); + getChild<LLCheckBoxCtrl>("remember_password")->setCommitCallback(boost::bind(&LLPanelLogin::onRememberPasswordCheck, this)); } void LLPanelLogin::addFavoritesToStartLocation() @@ -398,10 +399,22 @@ void LLPanelLogin::addFavoritesToStartLocation() combo->addSeparator(); LL_DEBUGS() << "Loading favorites for " << iter->first << LL_ENDL; LLSD user_llsd = iter->second; + bool update_password_setting = true; for (LLSD::array_const_iterator iter1 = user_llsd.beginArray(); iter1 != user_llsd.endArray(); ++iter1) { - std::string label = (*iter1)["name"].asString(); + if ((*iter1).has("save_password")) + { + bool save_password = (*iter1)["save_password"].asBoolean(); + gSavedSettings.setBOOL("RememberPassword", save_password); + if (!save_password) + { + getChild<LLButton>("connect_btn")->setEnabled(false); + } + update_password_setting = false; + } + + std::string label = (*iter1)["name"].asString(); std::string value = (*iter1)["slurl"].asString(); if(label != "" && value != "") { @@ -413,6 +426,10 @@ void LLPanelLogin::addFavoritesToStartLocation() } } } + if (update_password_setting) + { + gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE); + } break; } if (combo->getValue().asString().empty()) @@ -1081,6 +1098,14 @@ void LLPanelLogin::onRememberUserCheck(void*) } } +void LLPanelLogin::onRememberPasswordCheck(void*) +{ + if (sInstance) + { + gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE); + } +} + // static void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { |
