From 00ed76a265c1ee4ea4989f5de32ab80b6adb6623 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 7 Feb 2013 01:10:59 +0300 Subject: Add missing close button to some windows. --- src/gui/logindialog.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/gui/logindialog.cpp') 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(); +} -- cgit v1.2.3-70-g09d2