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.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/logindialog.cpp b/src/gui/logindialog.cpp
index c8304a61e..6d349243e 100644
--- a/src/gui/logindialog.cpp
+++ b/src/gui/logindialog.cpp
@@ -152,6 +152,8 @@ LoginDialog::LoginDialog(LoginData *const data, std::string serverName,
mUpdateHost(updateHost),
mServerName(serverName)
{
+ setCloseButton(true);
+
Label *const serverLabel1 = new Label(this, _("Server:"));
Label *const serverLabel2 = new Label(this, serverName);
serverLabel2->adjustSize();
@@ -255,7 +257,7 @@ void LoginDialog::action(const gcn::ActionEvent &event)
}
else if (event.getId() == "server")
{
- Client::setState(STATE_SWITCH_SERVER);
+ close();
}
else if (event.getId() == "register")
{
@@ -370,3 +372,9 @@ void LoginDialog::prepareUpdate()
else
LoginDialog::savedPasswordKey = "-";
}
+
+void LoginDialog::close()
+{
+ Client::setState(STATE_SWITCH_SERVER);
+ Window::close();
+}