summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1a171d84..8c70d62f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -103,7 +103,10 @@ Logger *logger; /**< Log object */
namespace {
struct ErrorListener : public gcn::ActionListener
{
- void action(const std::string& eventId, gcn::Widget* widget) { state = LOGIN_STATE; }
+ void action(const gcn::ActionEvent &event)
+ {
+ state = LOGIN_STATE;
+ }
} errorListener;
}
@@ -642,8 +645,8 @@ int main(int argc, char *argv[])
logger->log("State: CHAR_SERVER");
currentDialog = new ServerSelectDialog(&loginData);
if (options.chooseDefault || options.playername != "") {
- ((ServerSelectDialog*)currentDialog)->action("ok",
- NULL);
+ ((ServerSelectDialog*) currentDialog)->action(
+ gcn::ActionEvent(NULL, "ok"));
}
break;
@@ -652,15 +655,16 @@ int main(int argc, char *argv[])
currentDialog = new CharSelectDialog(network, &charInfo,
1 - loginData.sex);
- if (((CharSelectDialog*)currentDialog)->
+ if (((CharSelectDialog*) currentDialog)->
selectByName(options.playername))
options.chooseDefault = true;
else
- ((CharSelectDialog*)currentDialog)->selectByName(
+ ((CharSelectDialog*) currentDialog)->selectByName(
config.getValue("lastCharacter", ""));
if (options.chooseDefault)
- ((CharSelectDialog*)currentDialog)->action("ok", NULL);
+ ((CharSelectDialog*) currentDialog)->action(
+ gcn::ActionEvent(NULL, "ok"));
break;
case GAME_STATE: