|
a/src/qtgui/advsearch_w.cpp |
|
b/src/qtgui/advsearch_w.cpp |
|
... |
|
... |
46 |
#include "debuglog.h"
|
46 |
#include "debuglog.h"
|
47 |
#include "searchdata.h"
|
47 |
#include "searchdata.h"
|
48 |
#include "guiutils.h"
|
48 |
#include "guiutils.h"
|
49 |
#include "rclhelp.h"
|
49 |
#include "rclhelp.h"
|
50 |
|
50 |
|
51 |
extern RclConfig *rclconfig;
|
|
|
52 |
|
|
|
53 |
static const int initclausetypes[] = {1, 3, 0, 2, 5};
|
51 |
static const int initclausetypes[] = {1, 3, 0, 2, 5};
|
54 |
static const unsigned int iclausescnt = sizeof(initclausetypes) / sizeof(int);
|
52 |
static const unsigned int iclausescnt = sizeof(initclausetypes) / sizeof(int);
|
55 |
static map<QString,QString> cat_translations;
|
53 |
static map<QString,QString> cat_translations;
|
56 |
static map<QString,QString> cat_rtranslations;
|
54 |
static map<QString,QString> cat_rtranslations;
|
57 |
|
55 |
|
|
... |
|
... |
266 |
yesFiltypsLB->clear();
|
264 |
yesFiltypsLB->clear();
|
267 |
noFiltypsLB->insertItems(0, m_ignTypes);
|
265 |
noFiltypsLB->insertItems(0, m_ignTypes);
|
268 |
|
266 |
|
269 |
QStringList ql;
|
267 |
QStringList ql;
|
270 |
if (m_ignByCats == false) {
|
268 |
if (m_ignByCats == false) {
|
271 |
list<string> types = rclconfig->getAllMimeTypes();
|
269 |
list<string> types = theconfig->getAllMimeTypes();
|
272 |
for (list<string>::iterator it = types.begin();
|
270 |
for (list<string>::iterator it = types.begin();
|
273 |
it != types.end(); it++) {
|
271 |
it != types.end(); it++) {
|
274 |
QString qs = QString::fromUtf8(it->c_str());
|
272 |
QString qs = QString::fromUtf8(it->c_str());
|
275 |
if (m_ignTypes.indexOf(qs) < 0)
|
273 |
if (m_ignTypes.indexOf(qs) < 0)
|
276 |
ql.append(qs);
|
274 |
ql.append(qs);
|
277 |
}
|
275 |
}
|
278 |
} else {
|
276 |
} else {
|
279 |
list<string> cats;
|
277 |
list<string> cats;
|
280 |
rclconfig->getMimeCategories(cats);
|
278 |
theconfig->getMimeCategories(cats);
|
281 |
for (list<string>::const_iterator it = cats.begin();
|
279 |
for (list<string>::const_iterator it = cats.begin();
|
282 |
it != cats.end(); it++) {
|
280 |
it != cats.end(); it++) {
|
283 |
map<QString, QString>::const_iterator it1;
|
281 |
map<QString, QString>::const_iterator it1;
|
284 |
QString cat;
|
282 |
QString cat;
|
285 |
if ((it1 = cat_translations.find(QString::fromUtf8(it->c_str())))
|
283 |
if ((it1 = cat_translations.find(QString::fromUtf8(it->c_str())))
|
|
... |
|
... |
332 |
cat = (const char *)qit->second.toUtf8();
|
330 |
cat = (const char *)qit->second.toUtf8();
|
333 |
} else {
|
331 |
} else {
|
334 |
cat = (const char *)qcat.toUtf8();
|
332 |
cat = (const char *)qcat.toUtf8();
|
335 |
}
|
333 |
}
|
336 |
list<string> types;
|
334 |
list<string> types;
|
337 |
rclconfig->getMimeCatTypes(cat, types);
|
335 |
theconfig->getMimeCatTypes(cat, types);
|
338 |
for (list<string>::const_iterator it = types.begin();
|
336 |
for (list<string>::const_iterator it = types.begin();
|
339 |
it != types.end(); it++) {
|
337 |
it != types.end(); it++) {
|
340 |
sdata->addFiletype(*it);
|
338 |
sdata->addFiletype(*it);
|
341 |
}
|
339 |
}
|
342 |
} else {
|
340 |
} else {
|