summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorStefan Dombrowski <stefan@uni-bonn.de>2010-09-07 22:22:27 +0200
committerStefan Dombrowski <stefan@uni-bonn.de>2010-09-07 22:22:27 +0200
commit4092dbd156f84e00c1603274f534963d9f98667f (patch)
treeb5fd158620f2de389ed47cbf452dbb65881d3fa7 /src/client.cpp
parentd6f47f1f46c4e0e507a15a1f81903db901c0f4b5 (diff)
downloadmana-client-4092dbd156f84e00c1603274f534963d9f98667f.tar.gz
mana-client-4092dbd156f84e00c1603274f534963d9f98667f.tar.bz2
mana-client-4092dbd156f84e00c1603274f534963d9f98667f.tar.xz
mana-client-4092dbd156f84e00c1603274f534963d9f98667f.zip
Fixing logic that decides if ServerDialog shows up
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 3946d0f9..5488d8ad 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -607,19 +607,10 @@ int Client::exec()
// If a server was passed on the command line, or branding
// provides a server and a blank server list, we skip the
// server selection dialog.
- if (mOptions.serverName.empty() || mOptions.serverPort == 0
- || !(!branding.getValue("defaultServer","").empty() &&
- branding.getValue("defaultPort",0) &&
- branding.getValue("onlineServerList", "").empty()))
- {
- // Don't allow an alpha opacity
- // lower than the default value
- Theme::instance()->setMinimumOpacity(0.8f);
-
- mCurrentDialog = new ServerDialog(&mCurrentServer,
- mConfigDir);
- }
- else
+ if ((!mOptions.serverName.empty() && mOptions.serverPort)
+ || (!branding.getValue("defaultServer","").empty() &&
+ branding.getValue("defaultPort",0) &&
+ branding.getValue("onlineServerList", "").empty()))
{
mState = STATE_CONNECT_SERVER;
@@ -628,6 +619,15 @@ int Client::exec()
mOptions.serverName.clear();
mOptions.serverPort = 0;
}
+ else
+ {
+ // Don't allow an alpha opacity
+ // lower than the default value
+ Theme::instance()->setMinimumOpacity(0.8f);
+
+ mCurrentDialog = new ServerDialog(&mCurrentServer,
+ mConfigDir);
+ }
break;
case STATE_CONNECT_SERVER: