summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-17 23:59:18 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 15:12:18 +0300
commitb0e9e564c2cf081e512798f157dbbaebd7b99983 (patch)
tree33a2fa4d35a0d8e3652aac95f4a772efc493d8b4 /src
parent649348f19cdb3d65f825a2a3270b185fc9d83c75 (diff)
downloadmanaverse-b0e9e564c2cf081e512798f157dbbaebd7b99983.tar.gz
manaverse-b0e9e564c2cf081e512798f157dbbaebd7b99983.tar.bz2
manaverse-b0e9e564c2cf081e512798f157dbbaebd7b99983.tar.xz
manaverse-b0e9e564c2cf081e512798f157dbbaebd7b99983.zip
move virtual member calls from connectiondialog constuctor into postInit.
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp7
-rw-r--r--src/gui/windows/connectiondialog.cpp4
-rw-r--r--src/gui/windows/connectiondialog.h2
3 files changed, 13 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index f53873c6a..a3d07440a 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1235,6 +1235,7 @@ int Client::gameExec()
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Connecting to server"), STATE_SWITCH_SERVER);
+ mCurrentDialog->postInit();
TranslationManager::loadCurrentLang();
BLOCK_END("Client::gameExec STATE_CONNECT_SERVER")
break;
@@ -1278,6 +1279,7 @@ int Client::gameExec()
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Logging in"), STATE_SWITCH_SERVER);
+ mCurrentDialog->postInit();
BLOCK_END("Client::gameExec STATE_LOGIN_ATTEMPT")
break;
@@ -1317,6 +1319,7 @@ int Client::gameExec()
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Entering game world"), STATE_WORLD_SELECT);
+ mCurrentDialog->postInit();
BLOCK_END("Client::gameExec STATE_WORLD_SELECT_ATTEMPT")
break;
@@ -1439,6 +1442,7 @@ int Client::gameExec()
// TRANSLATORS: connection dialog header
_("Requesting characters"),
STATE_SWITCH_SERVER);
+ mCurrentDialog->postInit();
BLOCK_END("Client::gameExec STATE_GET_CHARACTERS")
break;
@@ -1480,6 +1484,7 @@ int Client::gameExec()
_("Connecting to the game server"),
Net::getNetworkType() != ServerInfo::MANASERV ?
STATE_CHOOSE_SERVER : STATE_SWITCH_CHARACTER);
+ mCurrentDialog->postInit();
BLOCK_END("Client::gameExec STATE_CONNECT_GAME")
break;
@@ -1492,6 +1497,7 @@ int Client::gameExec()
// TRANSLATORS: connection dialog header
_("Changing game servers"),
STATE_SWITCH_CHARACTER);
+ mCurrentDialog->postInit();
BLOCK_END("Client::gameExec STATE_CHANGE_MAP")
break;
@@ -1574,6 +1580,7 @@ int Client::gameExec()
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Requesting registration details"), STATE_LOGIN);
+ mCurrentDialog->postInit();
BLOCK_END("Client::gameExec STATE_REGISTER_PREP")
break;
diff --git a/src/gui/windows/connectiondialog.cpp b/src/gui/windows/connectiondialog.cpp
index cb03b5bbc..e0ca56e41 100644
--- a/src/gui/windows/connectiondialog.cpp
+++ b/src/gui/windows/connectiondialog.cpp
@@ -53,6 +53,10 @@ ConnectionDialog::ConnectionDialog(const std::string &text,
reflowLayout();
center();
+}
+
+void ConnectionDialog::postInit()
+{
setVisible(true);
}
diff --git a/src/gui/windows/connectiondialog.h b/src/gui/windows/connectiondialog.h
index 6c7d298c5..596b32fde 100644
--- a/src/gui/windows/connectiondialog.h
+++ b/src/gui/windows/connectiondialog.h
@@ -49,6 +49,8 @@ class ConnectionDialog final : public Window, private gcn::ActionListener
A_DELETE_COPY(ConnectionDialog)
+ void postInit();
+
/**
* Called when the user presses Cancel. Restores the global state to
* the previous one.