summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-21 04:05:46 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-21 04:05:46 +0200
commit7be91e6213aadb0405bdd2fa3a9210598b254041 (patch)
treedb0d43813e604c28f20ca74b7a707c9e35326f9f /src/gui
parent1edb1cbc3b1dabad1fc366bbefb5ba8d0060a7ab (diff)
downloadmv-7be91e6213aadb0405bdd2fa3a9210598b254041.tar.gz
mv-7be91e6213aadb0405bdd2fa3a9210598b254041.tar.bz2
mv-7be91e6213aadb0405bdd2fa3a9210598b254041.tar.xz
mv-7be91e6213aadb0405bdd2fa3a9210598b254041.zip
Show network error dialog as not modal.
This fix stuck client in some situations. Also prevent server change if now disconnected.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/quitdialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp
index 2166902f6..7fc87c02a 100644
--- a/src/gui/quitdialog.cpp
+++ b/src/gui/quitdialog.cpp
@@ -33,6 +33,7 @@
#include "gui/widgets/radiobutton.h"
#include "net/charhandler.h"
+#include "net/gamehandler.h"
#include "net/net.h"
#include "utils/gettext.h"
@@ -138,7 +139,8 @@ void QuitDialog::action(const gcn::ActionEvent &event)
{
Client::setState(STATE_EXIT);
}
- else if (mSwitchAccountServer->isSelected())
+ else if (Net::getGameHandler()->isConnected()
+ && mSwitchAccountServer->isSelected())
{
Client::setState(STATE_SWITCH_SERVER);
}