summaryrefslogtreecommitdiff
path: root/src/gui/help.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-07-11 20:05:44 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-07-11 20:05:44 +0200
commitabde0f51b3062c158fb52e9dfff23d21d3be03d1 (patch)
tree4af561ea9e8cd3f7f981cce9817cf57f3e353787 /src/gui/help.cpp
parent93e1a2a9e5f379945a6efb24598319b605be1dfa (diff)
downloadmana-client-abde0f51b3062c158fb52e9dfff23d21d3be03d1.tar.gz
mana-client-abde0f51b3062c158fb52e9dfff23d21d3be03d1.tar.bz2
mana-client-abde0f51b3062c158fb52e9dfff23d21d3be03d1.tar.xz
mana-client-abde0f51b3062c158fb52e9dfff23d21d3be03d1.zip
Made the different hard-coded paths and files be now taken from the
data/paths.xml configuration file. Also added default gui theme path in branding and default wallpaper path and file searched respectively in the branding and paths.xml files. Hard-coded values are still used as fallbacks. Resolves: Manasource Mantis #148. Reviewed-by: jaxad0127.
Diffstat (limited to 'src/gui/help.cpp')
-rw-r--r--src/gui/help.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/help.cpp b/src/gui/help.cpp
index 9d237f18..f3c6a0af 100644
--- a/src/gui/help.cpp
+++ b/src/gui/help.cpp
@@ -29,6 +29,7 @@
#include "gui/widgets/scrollarea.h"
#include "resources/resourcemanager.h"
+#include "configuration.h"
#include "utils/gettext.h"
@@ -93,8 +94,11 @@ void HelpWindow::loadHelp(const std::string &helpFile)
void HelpWindow::loadFile(const std::string &file)
{
ResourceManager *resman = ResourceManager::getInstance();
+ std::string helpPath = branding.getValue("helpPath", "");
+ if (helpPath.empty())
+ helpPath = paths.getValue("help", "help/");
std::vector<std::string> lines =
- resman->loadTextFile("help/" + file + ".txt");
+ resman->loadTextFile(helpPath + file + ".txt");
for (unsigned int i = 0; i < lines.size(); ++i)
{