diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-26 00:01:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-26 00:01:56 +0300 |
commit | 803b6afd00b0e3574b40b866f21a0d3d01f6dc4d (patch) | |
tree | 8a55ef881f1eaac4d216b3f5d2c4605eb520070d /src/gui/theme.cpp | |
parent | 8478d540748edccf36dc9bda5f0c3de0aa7bf763 (diff) | |
download | plus-803b6afd00b0e3574b40b866f21a0d3d01f6dc4d.tar.gz plus-803b6afd00b0e3574b40b866f21a0d3d01f6dc4d.tar.bz2 plus-803b6afd00b0e3574b40b866f21a0d3d01f6dc4d.tar.xz plus-803b6afd00b0e3574b40b866f21a0d3d01f6dc4d.zip |
Improve string usage in other files.
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r-- | src/gui/theme.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 202bfed20..846bb45c4 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -691,13 +691,13 @@ std::string Theme::resolveThemePath(const std::string &path) } // Try the theme - file = getThemePath() + "/" + file; + file = getThemePath().append("/").append(file); if (PhysFs::exists(file.c_str())) - return getThemePath() + "/" + path; + return getThemePath().append("/").append(path); // Backup - return branding.getStringValue("guiPath") + path; + return branding.getStringValue("guiPath").append(path); } Image *Theme::getImageFromTheme(const std::string &path) @@ -967,7 +967,7 @@ void Theme::loadColors(std::string file) if (file == "") file = "colors.xml"; else - file += "/colors.xml"; + file.append("/colors.xml"); XML::Document doc(resolveThemePath(file)); const XmlNodePtr root = doc.rootNode(); @@ -1135,9 +1135,14 @@ ThemeInfo *Theme::loadInfo(const std::string &themeName) { std::string path; if (themeName.empty()) + { path = "graphics/gui/info.xml"; + } else - path = defaultThemePath + themeName + "/info.xml"; + { + path = std::string(defaultThemePath).append( + themeName).append("/info.xml"); + } logger->log("loading: " + path); XML::Document doc(path); const XmlNodePtr rootNode = doc.rootNode(); |