summaryrefslogtreecommitdiff
path: root/src/gui/registerdialog.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/registerdialog.cpp
parent7c51bd3c7f488de09a56fdd3a7d14af3763b45e2 (diff)
downloadmanaplus-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.tar.gz
manaplus-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.tar.bz2
manaplus-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.tar.xz
manaplus-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.zip
Add missing close button to some windows.
Diffstat (limited to 'src/gui/registerdialog.cpp')
-rw-r--r--src/gui/registerdialog.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/registerdialog.cpp b/src/gui/registerdialog.cpp
index d803bd89e..53ce9b3d3 100644
--- a/src/gui/registerdialog.cpp
+++ b/src/gui/registerdialog.cpp
@@ -78,6 +78,8 @@ RegisterDialog::RegisterDialog(LoginData *const data):
mOtherButton(nullptr),
mWrongDataNoticeListener(new WrongDataNoticeListener)
{
+ setCloseButton(true);
+
const int optionalActions = Net::getLoginHandler()->
supportedOptionalActions();
@@ -168,7 +170,7 @@ void RegisterDialog::action(const gcn::ActionEvent &event)
{
if (event.getId() == "cancel")
{
- Client::setState(STATE_LOGIN);
+ close();
}
else if (event.getId() == "register" && canSubmit())
{
@@ -301,3 +303,9 @@ bool RegisterDialog::canSubmit() const
!mConfirmField->getText().empty() &&
Client::getState() == STATE_REGISTER;
}
+
+void RegisterDialog::close()
+{
+ Client::setState(STATE_LOGIN);
+ Window::close();
+}