Switch to unified view

a/src/qtgui/main.cpp b/src/qtgui/main.cpp
...
...
28
#include <qthread.h>
28
#include <qthread.h>
29
#include <qmessagebox.h>
29
#include <qmessagebox.h>
30
#include <qcheckbox.h>
30
#include <qcheckbox.h>
31
#include <qcombobox.h>
31
#include <qcombobox.h>
32
#include <QLocale>
32
#include <QLocale>
33
#include <QLibraryInfo>
33
34
34
#include "rcldb.h"
35
#include "rcldb.h"
35
#include "rclconfig.h"
36
#include "rclconfig.h"
36
#include "pathut.h"
37
#include "pathut.h"
37
#include "recoll.h"
38
#include "recoll.h"
...
...
295
    }
296
    }
296
    } else if (argc > 0)
297
    } else if (argc > 0)
297
    Usage();
298
    Usage();
298
299
299
300
300
    // Translation file for Qt
301
    QString slang = QLocale::system().name().left(2);
302
    QTranslator qt(0);
303
    qt.load(QString("qt_") + slang, "." );
304
    app.installTranslator( &qt );
305
306
    string reason;
301
    string reason;
307
    theconfig = recollinit(recollCleanup, sigcleanup, reason, &a_config);
302
    theconfig = recollinit(recollCleanup, sigcleanup, reason, &a_config);
308
    if (!theconfig || !theconfig->ok()) {
303
    if (!theconfig || !theconfig->ok()) {
309
    QString msg = "Configuration problem: ";
304
    QString msg = "Configuration problem: ";
310
    msg += QString::fromUtf8(reason.c_str());
305
    msg += QString::fromUtf8(reason.c_str());
311
    QMessageBox::critical(0, "Recoll",  msg);
306
    QMessageBox::critical(0, "Recoll",  msg);
312
    exit(1);
307
    exit(1);
313
    }
308
    }
309
    //    fprintf(stderr, "recollinit done\n");
314
    snapshotConfig();
310
    snapshotConfig();
315
    //    fprintf(stderr, "recollinit done\n");
311
312
    // Translations for Qt standard widgets
313
    QString slang = QLocale::system().name().left(2);
314
    QTranslator qt_trans(0);
315
    qt_trans.load(QString("qt_%1").arg(slang), 
316
        QLibraryInfo::location(QLibraryInfo::TranslationsPath));
317
    app.installTranslator(&qt_trans);
316
318
317
    // Translations for Recoll
319
    // Translations for Recoll
318
    string translatdir = path_cat(theconfig->getDatadir(), "translations");
320
    string translatdir = path_cat(theconfig->getDatadir(), "translations");
319
    QTranslator translator(0);
321
    QTranslator translator(0);
320
    translator.load( QString("recoll_") + slang, translatdir.c_str() );
322
    translator.load( QString("recoll_") + slang, translatdir.c_str() );