From 7c51bd3c7f488de09a56fdd3a7d14af3763b45e2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 7 Feb 2013 00:42:14 +0300 Subject: Add close button to servers dialog. --- src/gui/serverdialog.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/gui/serverdialog.cpp') diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index 778166d3b..e07a222e2 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -270,6 +270,8 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo, setWindowName("ServerDialog"); + setCloseButton(true); + mPersistentIPCheckBox = new CheckBox(this, _("Use same ip for game sub servers"), config.getBoolValue("usePersistentIP"), @@ -391,9 +393,7 @@ void ServerDialog::action(const gcn::ActionEvent &event) } else if (eventId == "quit") { - if (mDownload) - mDownload->cancel(); - Client::setState(STATE_FORCE_QUIT); + close(); } else if (eventId == "load") { @@ -824,3 +824,10 @@ bool ServerDialog::needUpdateServers() const return false; } + +void ServerDialog::close() +{ + if (mDownload) + mDownload->cancel(); + Client::setState(STATE_FORCE_QUIT); +} -- cgit v1.2.3-70-g09d2