summaryrefslogtreecommitdiff
path: root/src/gui/logindialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-29 21:49:11 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-29 21:49:11 +0300
commit27300ff284bbed3b6bce938071c3982e4a757680 (patch)
tree4553173ccbc0c5e5f98a767c3cd6b394a7b25409 /src/gui/logindialog.cpp
parent72c39aee65ed88c81343c80bd5cbfbf1f4611218 (diff)
downloadmanaplus-27300ff284bbed3b6bce938071c3982e4a757680.tar.gz
manaplus-27300ff284bbed3b6bce938071c3982e4a757680.tar.bz2
manaplus-27300ff284bbed3b6bce938071c3982e4a757680.tar.xz
manaplus-27300ff284bbed3b6bce938071c3982e4a757680.zip
Fix deleting character if nick not saved.
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);
}