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/charselectdialog.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/gui/charselectdialog.cpp') 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) : -- cgit v1.2.3-60-g2f50