summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/serverdialog.cpp')
-rw-r--r--src/gui/serverdialog.cpp13
1 files changed, 10 insertions, 3 deletions
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);
+}