summaryrefslogtreecommitdiff
path: root/src/gui/logindialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-07 01:10:59 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-07 01:10:59 +0300
commit00ed76a265c1ee4ea4989f5de32ab80b6adb6623 (patch)
tree1e450140ce1b4dfa8811f8435a91ce1636224296 /src/gui/logindialog.cpp
parent7c51bd3c7f488de09a56fdd3a7d14af3763b45e2 (diff)
downloadmanaverse-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.tar.gz
manaverse-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.tar.bz2
manaverse-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.tar.xz
manaverse-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.zip
Add missing close button to some windows.
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();
+}