updated on Mon Jan 9 08:00:21 UTC 2012
[aur-mirror.git] / freedoko / help.cpp.diff
blobb00da3975bbfa191f929c717303581dc699a3166
1 --- src/ui/help.cpp 2011-12-18 09:05:16.000000000 +0100
2 +++ src/ui/help.cpp 2011-12-21 02:46:10.950197011 +0100
3 @@ -152,14 +152,16 @@
4 for (list<string>::const_iterator d = datadir.begin();
5 d != datadir.end();
6 d++)
7 - directories.push_back(*d + "/"
8 + directories.push_back((::setting(Setting::MANUAL_DIRECTORY)[0] == '/'
9 + ? "" : *d + "/")
10 + ::setting(Setting::MANUAL_DIRECTORY) + "/"
11 + ::translator.token());
12 if (::translator.token() != ::setting(Setting::LANGUAGE))
13 for (list<string>::const_iterator d = datadir.begin();
14 d != datadir.end();
15 d++)
16 - directories.push_back(*d + "/"
17 + directories.push_back((::setting(Setting::MANUAL_DIRECTORY)[0] == '/'
18 + ? "" : *d + "/")
19 + ::setting(Setting::MANUAL_DIRECTORY) + "/"
20 + ::setting(Setting::LANGUAGE));
21 } // fill the directories list
22 @@ -167,9 +169,12 @@
24 { // search the manual page
25 list<string>::iterator d;
26 - for (d = directories.begin(); d != directories.end(); d++)
27 - if (DK::Utils::File::isfile(*d + "/" + page))
28 + for (d = directories.begin(); d != directories.end(); d++) {
29 + CLOG << *d << endl;
30 + if (DK::Utils::File::isfile(*d + "/" + page)) {
31 return ("file://" + DK::Utils::File::absolute_path(*d + "/" + page));
32 + }
33 + }
34 } // search the manual page
36 return ("http://free-doko.sourceforge.net/doc/manual/"