diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-01-24 14:28:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-01-24 14:28:29 +0300 |
commit | d684a9bef13752dcbe9c142a6f54bafcba952289 (patch) | |
tree | 4a52ab3e231f76e98d032173834761cecfc8681a /src | |
parent | 504f93b83e6f7448c5eb3fbcb421e94b7f34f699 (diff) | |
download | manaverse-d684a9bef13752dcbe9c142a6f54bafcba952289.tar.gz manaverse-d684a9bef13752dcbe9c142a6f54bafcba952289.tar.bz2 manaverse-d684a9bef13752dcbe9c142a6f54bafcba952289.tar.xz manaverse-d684a9bef13752dcbe9c142a6f54bafcba952289.zip |
Fix branding issues. Like incorrect default app name, not connecting to server.
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 11 | ||||
-rw-r--r-- | src/defaults.cpp | 4 | ||||
-rw-r--r-- | src/game.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/desktop.cpp | 8 |
4 files changed, 15 insertions, 10 deletions
diff --git a/src/client.cpp b/src/client.cpp index 1c4629178..c51dffa9e 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -612,6 +612,7 @@ void Client::gameInit() { mCurrentServer.hostname = branding.getValue("defaultServer", "").c_str(); + mOptions.serverName = mCurrentServer.hostname; } if (mCurrentServer.port == 0) @@ -1563,7 +1564,7 @@ void Client::initLocalDataDir() // Use Application Directory instead of .mana mLocalDataDir = std::string(PHYSFS_getUserDir()) + "/Library/Application Support/" + - branding.getValue("appName", "Mana"); + branding.getValue("appName", "ManaPlus"); #elif defined __HAIKU__ mLocalDataDir = std::string(PHYSFS_getUserDir()) + "/config/data/Mana"; @@ -1597,13 +1598,13 @@ void Client::initConfigDir() #elif defined __HAIKU__ mConfigDir = std::string(PHYSFS_getUserDir()) + "/config/settings/Mana" + - branding.getValue("appName", "Mana"); + branding.getValue("appName", "ManaPlus"); #elif defined WIN32 mConfigDir = getSpecialFolderLocation(CSIDL_APPDATA); if (mConfigDir.empty()) mConfigDir = mLocalDataDir; else - mConfigDir += "/mana/" + branding.getValue("appShort", "Mana"); + mConfigDir += "/mana/" + branding.getValue("appShort", "mana"); #else mConfigDir = std::string(PHYSFS_getUserDir()) + "/.config/mana/" + branding.getValue("appShort", "mana"); @@ -1855,7 +1856,7 @@ void Client::initScreenshotDir() if (config.getBoolValue("useScreenshotDirectorySuffix")) { std::string configScreenshotSuffix = - branding.getValue("appShort", "Mana"); + branding.getValue("appShort", "mana"); if (!configScreenshotSuffix.empty()) { @@ -1917,7 +1918,7 @@ bool Client::createConfig(std::string &configPath) // Use Application Directory instead of .mana oldHomeDir = std::string(PHYSFS_getUserDir()) + "/Library/Application Support/" + - branding.getValue("appName", "Mana"); + branding.getValue("appName", "ManaPlus"); #else oldHomeDir = std::string(PHYSFS_getUserDir()) + "/." + branding.getValue("appShort", "mana"); diff --git a/src/defaults.cpp b/src/defaults.cpp index 8c0b84ae2..8444fafff 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -234,8 +234,8 @@ DefaultsData* getBrandingDefaults() // Init config defaults AddDEF(brandingData, "wallpapersPath", ""); AddDEF(brandingData, "wallpapersFile", ""); - AddDEF(brandingData, "appName", "Mana"); - AddDEF(brandingData, "appIcon", "icons/mana.png"); + AddDEF(brandingData, "appName", "ManaPlus"); + AddDEF(brandingData, "appIcon", "icons/manaplus.png"); AddDEF(brandingData, "loginMusic", "Magick - Real.ogg"); AddDEF(brandingData, "defaultServer", ""); AddDEF(brandingData, "defaultPort", DEFAULT_PORT); diff --git a/src/game.cpp b/src/game.cpp index 14a988700..aa9ba1536 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -490,7 +490,7 @@ static bool saveScreenshot() filenameSuffix.str(""); filename.str(""); filename << screenshotDirectory << "/"; - filenameSuffix << branding.getValue("appShort", "ManaPlus") + filenameSuffix << branding.getValue("appName", "ManaPlus") << "_Screenshot_" << screenshotCount << ".png"; filename << filenameSuffix.str(); testExists.open(filename.str().c_str(), std::ios::in); diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index beb232fb2..b40558c78 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -48,10 +48,14 @@ Desktop::Desktop() : std::string appName = branding.getValue("appName", std::string("")); if (appName.empty()) + { mVersionLabel = new Label(FULL_VERSION); + } else - mVersionLabel = new Label(strprintf("%s (Mana %s)", appName.c_str(), - FULL_VERSION)); + { + mVersionLabel = new Label(strprintf("%s (%s)", FULL_VERSION, + appName.c_str())); + } mVersionLabel->setBackgroundColor( Theme::getThemeColor(Theme::BACKGROUND, 128)); |