diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-10 20:16:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-10 20:47:24 +0300 |
commit | 6c9c56b70db43f4100863d312835fce763698008 (patch) | |
tree | 4a182019f18677c1b71202a79d8f4faceebe05c9 /src/gui | |
parent | 5e7866bd7cc3bf850d9ba3e636d8eca88ac797c7 (diff) | |
download | mv-6c9c56b70db43f4100863d312835fce763698008.tar.gz mv-6c9c56b70db43f4100863d312835fce763698008.tar.bz2 mv-6c9c56b70db43f4100863d312835fce763698008.tar.xz mv-6c9c56b70db43f4100863d312835fce763698008.zip |
Rename physfstools into virtfs.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/theme.cpp | 22 | ||||
-rw-r--r-- | src/gui/widgets/browserbox_unittest.cc | 2 | ||||
-rw-r--r-- | src/gui/windowmanager_unittest.cc | 8 | ||||
-rw-r--r-- | src/gui/windows/minimap.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/updaterwindow.cpp | 4 |
5 files changed, 21 insertions, 21 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 76a5d0a94..a60b01e99 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -46,7 +46,7 @@ #include "utils/dtor.h" #include "utils/files.h" -#include "utils/physfstools.h" +#include "utils/virtfs.h" #include "debug.h" @@ -64,7 +64,7 @@ static void initDefaultThemePath() defaultThemePath = branding.getStringValue("guiThemePath"); logger->log("defaultThemePath: " + defaultThemePath); - if (!defaultThemePath.empty() && PhysFs::isDirectory( + if (!defaultThemePath.empty() && VirtFs::isDirectory( defaultThemePath.c_str())) { return; @@ -397,7 +397,7 @@ Skin *Theme::readSkin(const std::string &filename, const bool full) return nullptr; const std::string path = resolveThemePath(filename); - if (!PhysFs::exists(path.c_str())) + if (!VirtFs::exists(path.c_str())) return nullptr; XML::Document *const doc = Loader::getXml(path, UseResman_true, @@ -550,7 +550,7 @@ bool Theme::tryThemePath(const std::string &themeName) if (!themeName.empty()) { const std::string path = defaultThemePath + themeName; - if (PhysFs::exists(path.c_str())) + if (VirtFs::exists(path.c_str())) { mThemePath = path; mThemeName = themeName; @@ -570,19 +570,19 @@ void Theme::fillSkinsList(StringVect &list) void Theme::fillFontsList(StringVect &list) { - PhysFs::permitLinks(true); + VirtFs::permitLinks(true); Files::getFiles(branding.getStringValue("fontsPath"), list); - PhysFs::permitLinks(false); + VirtFs::permitLinks(false); } void Theme::fillSoundsList(StringVect &list) { - char **skins = PhysFs::enumerateFiles( + char **skins = VirtFs::enumerateFiles( branding.getStringValue("systemsounds").c_str()); for (char **i = skins; *i; i++) { - if (!PhysFs::isDirectory(( + if (!VirtFs::isDirectory(( branding.getStringValue("systemsounds") + *i).c_str())) { std::string str = *i; @@ -591,7 +591,7 @@ void Theme::fillSoundsList(StringVect &list) } } - PhysFs::freeList(skins); + VirtFs::freeList(skins); } void Theme::selectSkin() @@ -637,14 +637,14 @@ std::string Theme::resolveThemePath(const std::string &path) if (file.find('/') != std::string::npos) { // Might be a valid path already - if (PhysFs::exists(file.c_str())) + if (VirtFs::exists(file.c_str())) return path; } // Try the theme file = getThemePath().append("/").append(file); - if (PhysFs::exists(file.c_str())) + if (VirtFs::exists(file.c_str())) return getThemePath().append("/").append(path); // Backup diff --git a/src/gui/widgets/browserbox_unittest.cc b/src/gui/widgets/browserbox_unittest.cc index b31758cbd..dfa9757b5 100644 --- a/src/gui/widgets/browserbox_unittest.cc +++ b/src/gui/widgets/browserbox_unittest.cc @@ -171,5 +171,5 @@ TEST_CASE("BrowserBox tests", "browserbox") delete box; delete client; client = nullptr; -// PhysFs::deinit(); +// VirtFs::deinit(); } diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc index c3c62724c..d3dc57b3e 100644 --- a/src/gui/windowmanager_unittest.cc +++ b/src/gui/windowmanager_unittest.cc @@ -117,7 +117,7 @@ #include "utils/delete2.h" #include "utils/env.h" #include "utils/gettext.h" -#include "utils/physfstools.h" +#include "utils/virtfs.h" #include "utils/translation/translationmanager.h" @@ -296,7 +296,7 @@ TEST_CASE("Windows tests", "windowmanager") SECTION("EditServerDialog") { ServerInfo mCurrentServer; - settings.configDir = PhysFs::getRealDir("test/serverlistplus.xml"); + settings.configDir = VirtFs::getRealDir("test/serverlistplus.xml"); ServerDialog *serverDialog = CREATEWIDGETR(ServerDialog, &mCurrentServer, settings.configDir); @@ -505,7 +505,7 @@ TEST_CASE("Windows tests", "windowmanager") SECTION("serversDialog") { ServerInfo mCurrentServer; - settings.configDir = PhysFs::getRealDir("test/serverlistplus.xml"); + settings.configDir = VirtFs::getRealDir("test/serverlistplus.xml"); ServerDialog *serverDialog = CREATEWIDGETR(ServerDialog, &mCurrentServer, settings.configDir); @@ -681,5 +681,5 @@ TEST_CASE("Windows tests", "windowmanager") delete2(client); delete2(serverFeatures); delete2(inventoryHandler); -// PhysFs::deinit(); +// VirtFs::deinit(); } diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index d5947d934..ce316b1eb 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -50,7 +50,7 @@ #include "resources/loaders/imageloader.h" #include "utils/gettext.h" -#include "utils/physfstools.h" +#include "utils/virtfs.h" #include "utils/sdlcheckutils.h" #include "debug.h" @@ -180,14 +180,14 @@ void Minimap::setMap(const Map *const map) std::string minimapName = map->getProperty("minimap"); - if (minimapName.empty() && PhysFs::exists(tempname.c_str())) + if (minimapName.empty() && VirtFs::exists(tempname.c_str())) minimapName = tempname; if (minimapName.empty()) { tempname = std::string("graphics/minimaps/").append( map->getFilename()).append(".png"); - if (PhysFs::exists(tempname.c_str())) + if (VirtFs::exists(tempname.c_str())) minimapName = tempname; } diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 3bf1d0e7b..645ec0e84 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -47,7 +47,7 @@ #include "utils/delete2.h" #include "utils/files.h" -#include "utils/physfstools.h" +#include "utils/virtfs.h" #include "utils/gettext.h" #include "utils/mkdir.h" #include "utils/paths.h" @@ -1066,7 +1066,7 @@ unsigned long UpdaterWindow::getFileHash(const std::string &filePath) { int size = 0; const char *const buf = static_cast<const char*>( - PhysFs::loadFile(filePath, size)); + VirtFs::loadFile(filePath, size)); if (!buf) return 0; return Net::Download::adlerBuffer(buf, size); |