Switch to unified view

a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp
...
...
39
// qt 4.6 qtextedit to clear the margins after the float img without 
39
// qt 4.6 qtextedit to clear the margins after the float img without 
40
// introducing blank space.
40
// introducing blank space.
41
const char *PrefsPack::dfltResListFormat = 
41
const char *PrefsPack::dfltResListFormat = 
42
    "<table><tr><td><a href='%U'><img src='%I' width='64'></a></td>"
42
    "<table><tr><td><a href='%U'><img src='%I' width='64'></a></td>"
43
    "<td>%L &nbsp;<i>%S</i> &nbsp;&nbsp;<b>%T</b><br>"
43
    "<td>%L &nbsp;<i>%S</i> &nbsp;&nbsp;<b>%T</b><br>"
44
    "<span style='white-space:nowrap'>%M&nbsp;%D</span>&nbsp;&nbsp;&nbsp; <i>%U</i>&nbsp;%i<br>"
44
    "<span style='white-space:nowrap'><i>%M</i>&nbsp;%D</span>&nbsp;&nbsp;&nbsp; <i>%U</i>&nbsp;%i<br>"
45
    "%A %K</td></tr></table>"
45
    "%A %K</td></tr></table>"
46
    ;
46
    ;
47
47
48
// The global preferences structure
48
// The global preferences structure
49
PrefsPack prefs;
49
PrefsPack prefs;
...
...
288
        path_catslash(dbdir);
288
        path_catslash(dbdir);
289
        if (std::find(prefs.allExtraDbs.begin(), 
289
        if (std::find(prefs.allExtraDbs.begin(), 
290
                  prefs.allExtraDbs.end(), dbdir) != 
290
                  prefs.allExtraDbs.end(), dbdir) != 
291
            prefs.allExtraDbs.end())
291
            prefs.allExtraDbs.end())
292
            continue;
292
            continue;
293
      bool stripped;
293
        if (!Rcl::Db::testDbDir(dbdir)) {
294
        if (!Rcl::Db::testDbDir(dbdir, &stripped)) {
294
            LOGERR(("Not a xapian index: [%s]\n", dbdir.c_str()));
295
            LOGERR(("Not a xapian index: [%s]\n", dbdir.c_str()));
296
          continue;
297
      }
298
      if (stripped != o_index_stripchars) {
299
          LOGERR(("Incompatible character stripping: [%s]\n",
300
              dbdir.c_str()));
295
            continue;
301
            continue;
296
        }
302
        }
297
        prefs.allExtraDbs.push_back(dbdir);
303
        prefs.allExtraDbs.push_back(dbdir);
298
        }
304
        }
299
    }
305
    }
...
...
303
309
304
    // Clean up the list: remove directories which are not
310
    // Clean up the list: remove directories which are not
305
    // actually there: useful for removable volumes.
311
    // actually there: useful for removable volumes.
306
    for (list<string>::iterator it = prefs.activeExtraDbs.begin();
312
    for (list<string>::iterator it = prefs.activeExtraDbs.begin();
307
         it != prefs.activeExtraDbs.end();) {
313
         it != prefs.activeExtraDbs.end();) {
314
      bool stripped;
308
        if (!Rcl::Db::testDbDir(*it)) {
315
        if (!Rcl::Db::testDbDir(*it, &stripped) || 
309
      LOGINFO(("Not a xapian index: [%s]\n", it->c_str()));
316
      stripped != o_index_stripchars) {
317
      LOGINFO(("Not a Xapian index or char stripping differs: [%s]\n",
318
           it->c_str()));
310
        it = prefs.activeExtraDbs.erase(it);
319
        it = prefs.activeExtraDbs.erase(it);
311
        } else {
320
        } else {
312
        it++;
321
        it++;
313
        }
322
        }
314
    }
323
    }
...
...
325
                path_catslash(dbdir);
334
                path_catslash(dbdir);
326
                if (std::find(prefs.activeExtraDbs.begin(),
335
                if (std::find(prefs.activeExtraDbs.begin(),
327
                              prefs.activeExtraDbs.end(), dbdir) !=
336
                              prefs.activeExtraDbs.end(), dbdir) !=
328
                    prefs.activeExtraDbs.end())
337
                    prefs.activeExtraDbs.end())
329
                    continue;
338
                    continue;
339
      bool strpd;
330
                if (!Rcl::Db::testDbDir(dbdir)) {
340
                if (!Rcl::Db::testDbDir(dbdir, &strpd) || 
331
                    LOGERR(("Not a xapian index: [%s]\n", dbdir.c_str()));
341
          strpd != o_index_stripchars) {
342
                    LOGERR(("Not a Xapian dir or diff. char stripping: [%s]\n",
343
              dbdir.c_str()));
332
                    continue;
344
                    continue;
333
                }
345
                }
334
                prefs.activeExtraDbs.push_back(dbdir);
346
                prefs.activeExtraDbs.push_back(dbdir);
335
            } //for
347
            } //for
336
        } //if
348
        } //if