summaryrefslogtreecommitdiff
path: root/src
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
parent72c39aee65ed88c81343c80bd5cbfbf1f4611218 (diff)
downloadmv-27300ff284bbed3b6bce938071c3982e4a757680.tar.gz
mv-27300ff284bbed3b6bce938071c3982e4a757680.tar.bz2
mv-27300ff284bbed3b6bce938071c3982e4a757680.tar.xz
mv-27300ff284bbed3b6bce938071c3982e4a757680.zip
Fix deleting character if nick not saved.
Diffstat (limited to 'src')
-rw-r--r--src/gui/logindialog.cpp8
-rw-r--r--src/gui/logindialog.h1
-rw-r--r--src/gui/serverdialog.cpp3
3 files changed, 9 insertions, 3 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);
}
diff --git a/src/gui/logindialog.h b/src/gui/logindialog.h
index ade45c211..e464c6f24 100644
--- a/src/gui/logindialog.h
+++ b/src/gui/logindialog.h
@@ -88,6 +88,7 @@ class LoginDialog : public Window, public gcn::ActionListener,
LoginData *mLoginData;
std::string *mUpdateHost;
UpdateTypeModel *mUpdateTypeModel;
+ std::string mServerName;
};
#endif
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 0dc817646..140e4b629 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -236,12 +236,13 @@ ServerDialog::ServerDialog(ServerInfo *serverInfo, const std::string &dir):
mPersistentIPCheckBox(0)
{
if (isSafeMode)
- setCaption("Choose Your Server *** SAFE MODE ***");
+ setCaption(_("Choose Your Server *** SAFE MODE ***"));
setWindowName("ServerDialog");
Label *serverLabel = new Label(_("Server:"));
Label *portLabel = new Label(_("Port:"));
+
mServerNameField = new TextField(mServerInfo->hostname);
mPortField = new TextField(toString(mServerInfo->port));
mPersistentIPCheckBox = new CheckBox(_("Use same ip for game sub servers"),