summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorStefan Dombrowski <stefan@uni-bonn.de>2009-12-18 21:43:53 +0100
committerFreeyorp <Freeyorp101@hotmail.com>2009-12-19 19:12:15 +1300
commit6ad0ab8123de1ee3f27ad38300dc7ef896bab569 (patch)
tree785e9bd0f019e74329b080116d03b7c1b10d82b0 /src/main.cpp
parent7018bbb12c0807efb93acc5d90ec20d59cb3f1a9 (diff)
downloadmana-6ad0ab8123de1ee3f27ad38300dc7ef896bab569.tar.gz
mana-6ad0ab8123de1ee3f27ad38300dc7ef896bab569.tar.bz2
mana-6ad0ab8123de1ee3f27ad38300dc7ef896bab569.tar.xz
mana-6ad0ab8123de1ee3f27ad38300dc7ef896bab569.zip
Client now returns to server selection after server disconnection
This resolves http://bugs.manasource.org/view.php?id=37
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0f070dd1..8caef783 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -82,8 +82,6 @@
#include <SDL_image.h>
-#include <guichan/actionlistener.hpp>
-
#include <libxml/parser.h>
#include <getopt.h>
@@ -128,6 +126,7 @@ Game *game = 0;
State state = STATE_START;
std::string errorMessage;
+ErrorListener errorListener;
Sound sound;
Music *bgm;
@@ -649,15 +648,6 @@ static void loadUpdates()
}
}
-class ErrorListener : public gcn::ActionListener
-{
-public:
- void action(const gcn::ActionEvent &event)
- {
- state = STATE_CHOOSE_SERVER;
- }
-} errorListener;
-
class AccountListener : public gcn::ActionListener
{
public:
@@ -678,6 +668,11 @@ public:
} // namespace
+void ErrorListener::action(const gcn::ActionEvent &event)
+{
+ state = STATE_CHOOSE_SERVER;
+}
+
const std::string &getHomeDirectory()
{
return homeDir;