diff options
author | cpasjuste <cpasjuste@gmail.com> | 2020-04-25 09:13:02 +0200 |
---|---|---|
committer | cpasjuste <cpasjuste@gmail.com> | 2020-04-25 09:13:02 +0200 |
commit | 82735cd2e2d11376fc4f2576542f0f578bb3ed7a (patch) | |
tree | d32e267eddebaa7d89e525e7122864ca3acc7431 /src/gui/windows | |
parent | c4fad09b3d29679b15d456f6cc0d61b0f59a8d4c (diff) | |
download | plus-82735cd2e2d11376fc4f2576542f0f578bb3ed7a.tar.gz plus-82735cd2e2d11376fc4f2576542f0f578bb3ed7a.tar.bz2 plus-82735cd2e2d11376fc4f2576542f0f578bb3ed7a.tar.xz plus-82735cd2e2d11376fc4f2576542f0f578bb3ed7a.zip |
add "SAVE_PASSWORD" define option
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/logindialog.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index a8bb82c03..f169635dc 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -75,8 +75,12 @@ LoginDialog::LoginDialog(LoginData &data, LoseFocusOnTab_true, nullptr, std::string(), false)), mPassField(new PasswordField(this, mLoginData->password)), // TRANSLATORS: login dialog label +#ifdef SAVE_PASSWORD + mKeepCheck(new CheckBox(this, _("Remember user and password"), +#else mKeepCheck(new CheckBox(this, _("Remember username"), - mLoginData->remember, nullptr, std::string())), +#endif + mLoginData->remember, nullptr, std::string())), // TRANSLATORS: login dialog label mUpdateTypeLabel(new Label(this, _("Update:"))), mUpdateTypeModel(new UpdateTypeModel), @@ -202,8 +206,12 @@ void LoginDialog::postInit() if (mUserField->getText().empty()) mUserField->requestFocus(); - else + else { +#ifdef SAVE_PASSWORD + mPassField->setText(LoginDialog::savedPassword); +#endif mPassField->requestFocus(); + } mLoginButton->setEnabled(canSubmit()); if (loginHandler != nullptr) |