summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-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"),