summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-04-03 15:12:30 +0000
committerDavid Athay <ko2fan@gmail.com>2008-04-03 15:12:30 +0000
commitf19980be3abfc418dfc1f1411e3a9fc161620afa (patch)
tree0c4e7c0659a062ce8b77ff67de4f53eb775fc689 /src
parentebaefeb62f81a63a12a888459daee3eaf5bb4e36 (diff)
downloadmana-f19980be3abfc418dfc1f1411e3a9fc161620afa.tar.gz
mana-f19980be3abfc418dfc1f1411e3a9fc161620afa.tar.bz2
mana-f19980be3abfc418dfc1f1411e3a9fc161620afa.tar.xz
mana-f19980be3abfc418dfc1f1411e3a9fc161620afa.zip
Added patch from
postalworker bug id=117 to fix cancel connecting to a sick server.
Diffstat (limited to 'src')
-rw-r--r--src/gui/char_select.cpp2
-rw-r--r--src/gui/connection.cpp2
-rw-r--r--src/gui/login.cpp2
-rw-r--r--src/main.cpp6
4 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 17bbbd70..a691f4ec 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -147,7 +147,7 @@ void CharSelectDialog::action(const gcn::ActionEvent &event)
}
else if (event.getId() == "cancel")
{
- state = STATE_EXIT;
+ state = STATE_SWITCH_ACCOUNTSERVER_ATTEMPT;
}
else if (event.getId() == "new")
{
diff --git a/src/gui/connection.cpp b/src/gui/connection.cpp
index e7923b9a..a9fa2a56 100644
--- a/src/gui/connection.cpp
+++ b/src/gui/connection.cpp
@@ -29,6 +29,7 @@
#include "progressbar.h"
#include "../main.h"
+#include "../log.h"
#include "../utils/gettext.h"
@@ -55,6 +56,7 @@ ConnectionDialog::ConnectionDialog(int previousState):
void ConnectionDialog::action(gcn::ActionEvent const &)
{
+ logger->log("Cancel pressed");
state = mPreviousState;
}
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index 565277a0..57ad00c5 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -104,7 +104,7 @@ LoginDialog::action(const gcn::ActionEvent &event)
}
else if (event.getId() == "cancel")
{
- state = STATE_FORCE_QUIT;
+ state = STATE_SWITCH_ACCOUNTSERVER;
}
else if (event.getId() == "register")
{
diff --git a/src/main.cpp b/src/main.cpp
index 7d550571..92b55928 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -881,7 +881,7 @@ int main(int argc, char *argv[])
logger->log("Trying to connect to account server...");
accountServerConnection->connect(loginData.hostname,
loginData.port);
- currentDialog = new ConnectionDialog(STATE_CHOOSE_SERVER);
+ currentDialog = new ConnectionDialog(STATE_SWITCH_ACCOUNTSERVER_ATTEMPT);
break;
case STATE_UPDATE:
@@ -933,6 +933,8 @@ int main(int argc, char *argv[])
case STATE_SWITCH_ACCOUNTSERVER_ATTEMPT:
logger->log("State: SWITCH_ACCOUNTSERVER_ATTEMPT");
switchAccountServer();
+
+ state = STATE_SWITCH_ACCOUNTSERVER;
break;
case STATE_REGISTER:
@@ -994,7 +996,7 @@ int main(int argc, char *argv[])
case STATE_CONNECT_GAME:
logger->log("State: CONNECT_GAME");
- currentDialog = new ConnectionDialog(STATE_CHAR_SELECT);
+ currentDialog = new ConnectionDialog(STATE_SWITCH_ACCOUNTSERVER_ATTEMPT);
break;
case STATE_GAME: