summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2020-01-03 20:12:46 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2020-01-03 20:12:46 +0200
commit37ca582a2dacfbe7cbb37d2e9ecddca0a9bc8ed7 (patch)
tree362bb063f34d61e94aa2b13d16638a78acfba3cd /indra/newview
parentb6119253574cbc6ed355f342c056a4a198001a20 (diff)
SL-9699 Do not disable 'remember me' checkbox
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellogin.cpp26
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml8
2 files changed, 26 insertions, 8 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 4fd39d1211..00172277bc 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -560,7 +560,6 @@ void LLPanelLogin::populateFields(LLPointer<LLCredential> credential, bool remem
{
sInstance->getChild<LLUICtrl>("remember_name")->setValue(remember_user);
sInstance->populateUserList(credential);
- remember_check->setEnabled(remember_user);
}
}
@@ -1112,14 +1111,22 @@ void LLPanelLogin::onUserListCommit(void*)
}
// static
+// At the moment only happens if !mFirstLoginThisInstall
void LLPanelLogin::onRememberUserCheck(void*)
{
- if (sInstance)
+ if (sInstance && !sInstance->mFirstLoginThisInstall)
{
LLCheckBoxCtrl* remember_name(sInstance->getChild<LLCheckBoxCtrl>("remember_name"));
LLCheckBoxCtrl* remember_psswrd(sInstance->getChild<LLCheckBoxCtrl>("remember_check"));
+ LLComboBox* user_combo(sInstance->getChild<LLComboBox>("username_combo"));
bool remember = remember_name->getValue().asBoolean();
+ if (user_combo->getCurrentIndex() != -1 && !remember)
+ {
+ remember = true;
+ remember_name->setValue(true);
+ LLNotificationsUtil::add("LoginCantRemoveUsername");
+ }
remember_psswrd->setEnabled(remember);
}
}
@@ -1185,12 +1192,15 @@ void LLPanelLogin::updateLoginButtons()
login_btn->setEnabled(mUsernameLength != 0 && mPasswordLength != 0);
- if (!mFirstLoginThisInstall)
- {
- LLComboBox* user_combo = getChild<LLComboBox>("username_combo");
- LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name");
- remember_name->setEnabled(user_combo->getCurrentIndex() == -1);
- }
+ if (!mFirstLoginThisInstall)
+ {
+ LLComboBox* user_combo = getChild<LLComboBox>("username_combo");
+ LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name");
+ if (user_combo->getCurrentIndex() != -1)
+ {
+ remember_name->setValue(true);
+ } // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user
+ }
}
void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 669d6a40c6..70f3139488 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3552,6 +3552,14 @@ If this is your first time using [SECOND_LIFE], you will need to create an accou
<notification
icon="alertmodal.tga"
+ name="LoginCantRemoveUsername"
+ type="alertmodal">
+ <tag>fail</tag>
+Already remembered user can be forgotten from Me &gt; Preferences &gt; Advanced &gt; Remembered Usernames.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="LoginPacketNeverReceived"
type="alertmodal">
<tag>fail</tag>