Switch to unified view

a/src/qtgui/rclmain.cpp b/src/qtgui/rclmain.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.14 2006-03-22 16:24:41 dockes Exp $ (C) 2005 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.15 2006-03-31 17:19:45 dockes Exp $ (C) 2005 J.F.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
...
...
57
#include "rclversion.h"
57
#include "rclversion.h"
58
#include "sortseq.h"
58
#include "sortseq.h"
59
#include "uiprefs.h"
59
#include "uiprefs.h"
60
#include "guiutils.h"
60
#include "guiutils.h"
61
#include "rclreslist.h"
61
#include "rclreslist.h"
62
#include "transcode.h"
62
63
63
#include "rclmain.h"
64
#include "rclmain.h"
64
#include "moc_rclmain.cpp"
65
#include "moc_rclmain.cpp"
65
66
66
extern "C" int XFlush(void *);
67
extern "C" int XFlush(void *);
...
...
217
    LOGINFO(("Indexing done: closing query database\n"));
218
    LOGINFO(("Indexing done: closing query database\n"));
218
    rcldb->close();
219
    rcldb->close();
219
    } else if (indexingdone == 0) {
220
    } else if (indexingdone == 0) {
220
    if (toggle == 0) {
221
    if (toggle == 0) {
221
        QString msg = tr("Indexing in progress: ");
222
        QString msg = tr("Indexing in progress: ");
222
        msg += idxthread_currentfile().c_str();
223
        string cf = idxthread_currentfile();
224
      string mf;int ecnt = 0;
225
      string fcharset = rclconfig->getDefCharset(true);
226
      if (!transcode(cf, mf, fcharset, "UTF-8", &ecnt) || ecnt) {
227
      mf = url_encode(cf, 0);
228
      }
229
      msg += QString::fromUtf8(mf.c_str());
223
        statusBar()->message(msg);
230
        statusBar()->message(msg);
224
    } else if (toggle == 9) {
231
    } else if (toggle == 9) {
225
        statusBar()->message("");
232
        statusBar()->message("");
226
    }
233
    }
227
    if (++toggle >= 10)
234
    if (++toggle >= 10)
...
...
263
    return;
270
    return;
264
    curPreview = 0;
271
    curPreview = 0;
265
272
266
    DocSequence *docsource;
273
    DocSequence *docsource;
267
    if (sortwidth > 0) {
274
    if (sortwidth > 0) {
268
    DocSequenceDb myseq(rcldb, tr("Query results"));
275
    DocSequenceDb myseq(rcldb, string(tr("Query results").utf8()));
269
    docsource = new DocSeqSorted(myseq, sortwidth, sortspecs,
276
    docsource = new DocSeqSorted(myseq, sortwidth, sortspecs,
270
                     tr("Query results (sorted)"));
277
                     string(tr("Query results (sorted)").utf8()));
271
    } else {
278
    } else {
272
    docsource = new DocSequenceDb(rcldb, tr("Query results"));
279
    docsource = new DocSequenceDb(rcldb, string(tr("Query results").utf8()));
273
    }
280
    }
274
    currentQueryData = sdata;
281
    currentQueryData = sdata;
275
    resList->setDocSource(docsource);
282
    resList->setDocSource(docsource);
276
}
283
}
277
284
...
...
470
477
471
    DocSequence *docsource;
478
    DocSequence *docsource;
472
    if (sortwidth > 0) {
479
    if (sortwidth > 0) {
473
    DocSequenceHistory myseq(rcldb, m_history, tr("Document history"));
480
    DocSequenceHistory myseq(rcldb, m_history, tr("Document history"));
474
    docsource = new DocSeqSorted(myseq, sortwidth, sortspecs,
481
    docsource = new DocSeqSorted(myseq, sortwidth, sortspecs,
475
                     tr("Document history (sorted)"));
482
                     string(tr("Document history (sorted)").utf8()));
476
    } else {
483
    } else {
477
    docsource = new DocSequenceHistory(rcldb, m_history, 
484
    docsource = new DocSequenceHistory(rcldb, m_history, 
478
                       tr("Document history"));
485
                       string(tr("Document history").utf8()));
479
    }
486
    }
480
    currentQueryData.erase();
487
    currentQueryData.erase();
481
    currentQueryData.description = tr("History data").utf8();
488
    currentQueryData.description = tr("History data").utf8();
482
    resList->setDocSource(docsource);
489
    resList->setDocSource(docsource);
483
}
490
}