diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-02 06:23:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-03 18:44:58 +0300 |
commit | 49631972db5b965413d4bbe36983a8d5bd203183 (patch) | |
tree | cb31545521cb4b33e65f8e94e7f2d5cd33e9e7a1 /src/gui | |
parent | be7786e70668c014b19263895a6c8f507ed8161d (diff) | |
download | manaplus-49631972db5b965413d4bbe36983a8d5bd203183.tar.gz manaplus-49631972db5b965413d4bbe36983a8d5bd203183.tar.bz2 manaplus-49631972db5b965413d4bbe36983a8d5bd203183.tar.xz manaplus-49631972db5b965413d4bbe36983a8d5bd203183.zip |
Use pathJoin for concatinate some paths.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popups/itempopup.cpp | 2 | ||||
-rw-r--r-- | src/gui/theme.cpp | 7 | ||||
-rw-r--r-- | src/gui/windows/mailviewwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/minimap.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 4 |
5 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index 5cdc1dd20..34e583f7a 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -182,7 +182,7 @@ void ItemPopup::setItem(const ItemInfo &item, if (showImage) { Image *const image = Loader::getImage(combineDye2( - paths.getStringValue("itemIcons").append(item.getDisplay().image), + pathJoin(paths.getStringValue("itemIcons"), item.getDisplay().image), item.getDyeIconColorsString(color))); mIcon->setImage(image); diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index bffd212f7..b68fa011d 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -1004,7 +1004,7 @@ void Theme::loadColors(std::string file) if (file.empty()) file = "colors.xml"; else - file.append("/colors.xml"); + file = pathJoin(file, "colors.xml"); XML::Document *const doc = Loader::getXml(resolveThemePath(file), UseVirtFs_true, @@ -1211,8 +1211,9 @@ ThemeInfo *Theme::loadInfo(const std::string &themeName) } else { - path = std::string(defaultThemePath).append( - themeName).append("/info.xml"); + path = pathJoin(defaultThemePath, + themeName, + "info.xml"); } logger->log("loading: " + path); XML::Document *const doc = Loader::getXml(path, diff --git a/src/gui/windows/mailviewwindow.cpp b/src/gui/windows/mailviewwindow.cpp index 879fa804a..54c3edca7 100644 --- a/src/gui/windows/mailviewwindow.cpp +++ b/src/gui/windows/mailviewwindow.cpp @@ -112,7 +112,7 @@ MailViewWindow::MailViewWindow(const MailMessage *const message) : const ItemInfo &item = ItemDB::get(message->itemId); // +++ need use message->cards and ItemColorManager for colors Image *const image = Loader::getImage(combineDye2( - paths.getStringValue("itemIcons").append( + pathJoin(paths.getStringValue("itemIcons"), item.getDisplay().image), item.getDyeIconColorsString(ItemColor_one))); diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index e43ea4138..2a2d6830a 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -186,8 +186,8 @@ void Minimap::setMap(const Map *const map) if (minimapName.empty()) { - tempname = std::string("graphics/minimaps/").append( - map->getFilename()).append(".png"); + tempname = pathJoin("graphics/minimaps", + std::string(map->getFilename()).append(".png")); if (VirtFs::exists(tempname)) minimapName = tempname; } diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index 1c7fca17e..e1b139bd8 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -717,8 +717,8 @@ void NpcDialog::parseListItems(const std::string &itemString) else { mItems.push_back(tmp.substr(pos + 1)); - Image *const img = Loader::getImage(std::string( - path).append(tmp.substr(0, pos)).append(".png")); + Image *const img = Loader::getImage(pathJoin(path, + std::string(tmp.substr(0, pos)).append(".png"))); mImages.push_back(img); } } |