summaryrefslogtreecommitdiff
path: root/src/gui/logindialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/logindialog.cpp')
-rw-r--r--src/gui/logindialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/logindialog.cpp b/src/gui/logindialog.cpp
index 436e401a8..ab5dc7401 100644
--- a/src/gui/logindialog.cpp
+++ b/src/gui/logindialog.cpp
@@ -85,7 +85,8 @@ LoginDialog::LoginDialog(LoginData *loginData, std::string serverName,
std::string *updateHost):
Window(_("Login")),
mLoginData(loginData),
- mUpdateHost(updateHost)
+ mUpdateHost(updateHost),
+ mServerName(serverName)
{
gcn::Label *serverLabel1 = new Label(_("Server:"));
gcn::Label *serverLabel2 = new Label(serverName);
@@ -195,8 +196,11 @@ void LoginDialog::action(const gcn::ActionEvent &event)
mServerButton->setEnabled(false);
mLoginButton->setEnabled(false);
+ LoginDialog::savedPassword = mPassField->getText();
if (mLoginData->remember)
- LoginDialog::savedPassword = mPassField->getText();
+ LoginDialog::savedPasswordKey = mServerName;
+ else
+ LoginDialog::savedPasswordKey = "-";
Client::setState(STATE_LOGIN_ATTEMPT);
}