summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-14 22:41:07 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-14 22:41:07 +0300
commit56d6454ba617d1dcddbbaa21e2066a7db0caee75 (patch)
tree5012e55f393db2d62b40eb64142fa4317b16c571 /src/gui
parentbdec92381ef60cd027292ed63e254e8de70028d9 (diff)
downloadplus-56d6454ba617d1dcddbbaa21e2066a7db0caee75.tar.gz
plus-56d6454ba617d1dcddbbaa21e2066a7db0caee75.tar.bz2
plus-56d6454ba617d1dcddbbaa21e2066a7db0caee75.tar.xz
plus-56d6454ba617d1dcddbbaa21e2066a7db0caee75.zip
Move some virtfs replated functions from files.cpp into virtfstools.cpp
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/fonts/font.cpp4
-rw-r--r--src/gui/theme.cpp5
-rw-r--r--src/gui/windowmanager.cpp3
-rw-r--r--src/gui/windows/chatwindow.cpp4
-rw-r--r--src/gui/windows/helpwindow.cpp6
5 files changed, 12 insertions, 10 deletions
diff --git a/src/gui/fonts/font.cpp b/src/gui/fonts/font.cpp
index 73b91ad4c..61bb93453 100644
--- a/src/gui/fonts/font.cpp
+++ b/src/gui/fonts/font.cpp
@@ -75,11 +75,11 @@
#include "resources/image/image.h"
#include "utils/delete2.h"
-#include "utils/files.h"
#include "utils/paths.h"
#include "utils/sdlcheckutils.h"
#include "utils/stringutils.h"
#include "utils/timer.h"
+#include "utils/virtfstools.h"
#include "debug.h"
@@ -162,7 +162,7 @@ TTF_Font *Font::openFont(const char *const name, const int size)
// return nullptr;
// return TTF_OpenFontIndexRW(rw, 1, size, 0);
// #else
- return TTF_OpenFontIndex(Files::getPath(name).c_str(),
+ return TTF_OpenFontIndex(VirtFs::getPath(name).c_str(),
size, 0);
// #endif
}
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 0c3d80a50..f77146751 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -47,6 +47,7 @@
#include "utils/dtor.h"
#include "utils/files.h"
#include "utils/virtfs.h"
+#include "utils/virtfstools.h"
#include "utils/virtlist.h"
#include "debug.h"
@@ -566,13 +567,13 @@ bool Theme::tryThemePath(const std::string &themeName)
void Theme::fillSkinsList(StringVect &list)
{
- Files::getDirs(branding.getStringValue("guiThemePath"), list);
+ VirtFs::getDirs(branding.getStringValue("guiThemePath"), list);
}
void Theme::fillFontsList(StringVect &list)
{
VirtFs::permitLinks(true);
- Files::getFiles(branding.getStringValue("fontsPath"), list);
+ VirtFs::getFiles(branding.getStringValue("fontsPath"), list);
VirtFs::permitLinks(false);
}
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp
index 4b735f058..aa61bcb09 100644
--- a/src/gui/windowmanager.cpp
+++ b/src/gui/windowmanager.cpp
@@ -60,6 +60,7 @@
#include "utils/files.h"
#include "utils/sdlcheckutils.h"
#include "utils/sdlhelper.h"
+#include "utils/virtfstools.h"
#ifdef __native_client__
#include "utils/naclmessages.h"
#endif // __native_client__
@@ -363,7 +364,7 @@ void WindowManager::setIcon()
iconFile.append(".png");
#endif // WIN32
- iconFile = Files::getPath(iconFile);
+ iconFile = VirtFs::getPath(iconFile);
logger->log("Loading icon from file: %s", iconFile.c_str());
#ifdef WIN32
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index e94d39dbe..094faea6d 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -71,7 +71,7 @@
#include "utils/copynpaste.h"
#include "utils/delete2.h"
-#include "utils/files.h"
+#include "utils/virtfstools.h"
#include <sys/stat.h>
@@ -227,7 +227,7 @@ void ChatWindow::postInit()
void ChatWindow::loadCommandsFile(const std::string &name)
{
StringVect list;
- Files::loadTextFile(name, list);
+ VirtFs::loadTextFile(name, list);
StringVectCIter it = list.begin();
const StringVectCIter it_end = list.end();
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 62c341ac3..e1ba2de30 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -38,9 +38,9 @@
#include "gui/widgets/scrollarea.h"
#include "utils/gettext.h"
-#include "utils/files.h"
#include "utils/paths.h"
#include "utils/process.h"
+#include "utils/virtfstools.h"
#include "utils/translation/podict.h"
#include "utils/translation/translationmanager.h"
@@ -161,11 +161,11 @@ void HelpWindow::loadTags()
helpPath = paths.getStringValue("tags");
StringVect filesVect;
- Files::getFilesInDir(helpPath, filesVect, ".idx");
+ VirtFs::getFilesInDir(helpPath, filesVect, ".idx");
FOR_EACH (StringVectCIter, itVect, filesVect)
{
StringVect lines;
- Files::loadTextFile(*itVect, lines);
+ VirtFs::loadTextFile(*itVect, lines);
FOR_EACH (StringVectCIter, it, lines)
{
const std::string &str = *it;