FIRE-16535: Set remember password checkbox to the value the user has set before a failed login

meow-7.2.2
Ansariel 2015-07-30 11:21:11 +02:00
parent fea46dd972
commit 700079f39a
3 changed files with 7 additions and 3 deletions

View File

@ -451,7 +451,7 @@ void FSPanelLogin::show(const LLRect &rect,
}
// static
void FSPanelLogin::setFields(LLPointer<LLCredential> credential)
void FSPanelLogin::setFields(LLPointer<LLCredential> credential, bool from_startup /* = false*/)
{
if (!sInstance)
{
@ -506,6 +506,10 @@ void FSPanelLogin::setFields(LLPointer<LLCredential> credential)
sInstance->getChild<LLLineEditor>("password_edit")->clear();
remember = false;
}
if (from_startup)
{
remember = gSavedSettings.getBOOL("RememberPassword");
}
sInstance->getChild<LLUICtrl>("remember_check")->setValue(remember);
}

View File

@ -63,7 +63,7 @@ public:
void (*callback)(S32 option, void* user_data),
void* callback_data);
static void setFields(LLPointer<LLCredential> credential);
static void setFields(LLPointer<LLCredential> credential, bool from_startup = false);
static void getFields(LLPointer<LLCredential>& credential, BOOL& remember);

View File

@ -1097,7 +1097,7 @@ bool idle_startup()
{
// <FS:CR>
//LLPanelLogin::setFields( gUserCredential, gRememberPassword);
FSPanelLogin::setFields(gUserCredential);
FSPanelLogin::setFields(gUserCredential, true);
// </FS:CR>
}
display_startup();