summaryrefslogtreecommitdiff
path: root/src/gui/charselectdialog.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/charselectdialog.cpp
parent7c51bd3c7f488de09a56fdd3a7d14af3763b45e2 (diff)
downloadmv-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.tar.gz
mv-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.tar.bz2
mv-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.tar.xz
mv-00ed76a265c1ee4ea4989f5de32ab80b6adb6623.zip
Add missing close button to some windows.
Diffstat (limited to 'src/gui/charselectdialog.cpp')
-rw-r--r--src/gui/charselectdialog.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp
index fd9eb1e88..f87bb6b93 100644
--- a/src/gui/charselectdialog.cpp
+++ b/src/gui/charselectdialog.cpp
@@ -153,7 +153,7 @@ CharSelectDialog::CharSelectDialog(LoginData *const data):
mDeleteDialog(nullptr),
mDeleteIndex(-1)
{
- setCloseButton(false);
+ setCloseButton(true);
const int optionalActions = Net::getLoginHandler()
->supportedOptionalActions();
@@ -250,7 +250,7 @@ void CharSelectDialog::action(const gcn::ActionEvent &event)
}
else if (eventId == "switch")
{
- Client::setState(STATE_SWITCH_LOGIN);
+ close();
}
else if (eventId == "change_password")
{
@@ -557,6 +557,12 @@ bool CharSelectDialog::selectByName(const std::string &name,
return false;
}
+void CharSelectDialog::close()
+{
+ Client::setState(STATE_SWITCH_LOGIN);
+ Window::close();
+}
+
CharacterDisplay::CharacterDisplay(const Widget2 *const widget,
CharSelectDialog *const charSelectDialog) :