|
a/src/qtgui/guiutils.cpp |
|
b/src/qtgui/guiutils.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.10 2006-04-27 09:23:10 dockes Exp $ (C) 2005 Jean-Francois Dockes";
|
2 |
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.11 2006-05-02 09:49:06 dockes Exp $ (C) 2005 Jean-Francois Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* it under the terms of the GNU General Public License as published by
|
6 |
* it under the terms of the GNU General Public License as published by
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
... |
|
... |
17 |
* Free Software Foundation, Inc.,
|
17 |
* Free Software Foundation, Inc.,
|
18 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
18 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
19 |
*/
|
19 |
*/
|
20 |
#include <unistd.h>
|
20 |
#include <unistd.h>
|
21 |
|
21 |
|
|
|
22 |
#include <algorithm>
|
|
|
23 |
|
22 |
#include "debuglog.h"
|
24 |
#include "debuglog.h"
|
23 |
#include "smallut.h"
|
25 |
#include "smallut.h"
|
24 |
#include "recoll.h"
|
26 |
#include "recoll.h"
|
25 |
#include "guiutils.h"
|
27 |
#include "guiutils.h"
|
26 |
#include "pathut.h"
|
28 |
#include "pathut.h"
|
|
... |
|
... |
28 |
#include "rcldb.h"
|
30 |
#include "rcldb.h"
|
29 |
|
31 |
|
30 |
#include <qsettings.h>
|
32 |
#include <qsettings.h>
|
31 |
#include <qstringlist.h>
|
33 |
#include <qstringlist.h>
|
32 |
|
34 |
|
33 |
const static char *htmlbrowserlist =
|
35 |
static const char *htmlbrowserlist =
|
34 |
"opera konqueror firefox mozilla netscape";
|
36 |
"opera konqueror firefox mozilla netscape";
|
35 |
|
37 |
|
36 |
/**
|
38 |
/**
|
37 |
* Search for and launch an html browser for the documentation. If the
|
39 |
* Search for and launch an html browser for the documentation. If the
|
38 |
* user has set a preference, we use it directly instead of guessing.
|
40 |
* user has set a preference, we use it directly instead of guessing.
|
|
... |
|
... |
188 |
stringToTokens(cp, dbl, ":");
|
190 |
stringToTokens(cp, dbl, ":");
|
189 |
for (list<string>::iterator dit = dbl.begin(); dit != dbl.end();
|
191 |
for (list<string>::iterator dit = dbl.begin(); dit != dbl.end();
|
190 |
dit++) {
|
192 |
dit++) {
|
191 |
string dbdir = path_canon(*dit);
|
193 |
string dbdir = path_canon(*dit);
|
192 |
path_catslash(dbdir);
|
194 |
path_catslash(dbdir);
|
193 |
if (find(prefs.allExtraDbs.begin(), prefs.allExtraDbs.end(),
|
195 |
if (std::find(prefs.allExtraDbs.begin(),
|
|
|
196 |
prefs.allExtraDbs.end(), dbdir) !=
|
194 |
dbdir) != prefs.allExtraDbs.end())
|
197 |
prefs.allExtraDbs.end())
|
195 |
continue;
|
198 |
continue;
|
196 |
if (!Rcl::Db::testDbDir(dbdir)) {
|
199 |
if (!Rcl::Db::testDbDir(dbdir)) {
|
197 |
LOGERR(("Not a xapian database: [%s]\n", dbdir.c_str()));
|
200 |
LOGERR(("Not a xapian database: [%s]\n", dbdir.c_str()));
|
198 |
continue;
|
201 |
continue;
|
199 |
}
|
202 |
}
|