summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 7ec5a155..ae9af8de 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -619,20 +619,13 @@ int Client::exec()
case STATE_CHOOSE_SERVER:
logger->log("State: CHOOSE SERVER");
- // Allow changing this using a server choice dialog
- // We show the dialog box only if the command-line
- // options weren't set.
- if (mOptions.serverName.empty() && mOptions.serverPort == 0
- && !branding.getValue("onlineServerList", "a").empty())
- {
- // Don't allow an alpha opacity
- // lower than the default value
- Theme::instance()->setMinimumOpacity(0.8f);
-
- mCurrentDialog = new ServerDialog(&mCurrentServer,
- mConfigDir);
- }
- else
+ // 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)
+ || (!branding.getValue("defaultServer","").empty() &&
+ branding.getValue("defaultPort",0) &&
+ branding.getValue("onlineServerList", "").empty()))
{
mState = STATE_CONNECT_SERVER;
@@ -641,6 +634,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:
@@ -980,7 +982,7 @@ int Client::exec()
case STATE_ERROR:
logger->log("State: ERROR");
- logger->log("Error: %s\n", errorMessage.c_str());
+ logger->log("Error: %s", errorMessage.c_str());
mCurrentDialog = new OkDialog(_("Error"), errorMessage);
mCurrentDialog->addActionListener(&errorListener);
mCurrentDialog = NULL; // OkDialog deletes itself
@@ -1109,7 +1111,7 @@ void Client::initConfiguration()
{
// Fill configuration with defaults
config.setValue("hwaccel", false);
-#if (defined __APPLE__ || defined WIN32) && defined USE_OPENGL
+#if defined __APPLE__ && defined USE_OPENGL
config.setValue("opengl", true);
#else
config.setValue("opengl", false);