aboutsummaryrefslogtreecommitdiff
path: root/lumina-fileinfo/main.cpp
blob: 59e86623150fb40d17cb73a0a819b38aa5357e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <QTranslator>
#include <QApplication>
#include <QDebug>
#include <QFile>

#include "dialog.h"
#include <LuminaUtils.h>
#include <LuminaThemes.h>

int main(int argc, char ** argv)
{
    QApplication a(argc, argv);
    LUtils::LoadTranslation(&a, "lumina-fileinfo");
    LuminaThemeEngine theme(&a);

    Dialog w;
    QObject::connect(&theme, SIGNAL(updateIcons()), &w, SLOT(setupIcons()) );
    if (argc==2) {
        w.LoadDesktopFile(QString(argv[1]).simplified());
    } else if (argc==3) {
        w.Initialise(QString(argv[1]).simplified());
        w.LoadDesktopFile(QString(argv[2]).simplified());
    } else {
        w.MissingInputs();
    }
    w.show();

    int retCode = a.exec();
    return retCode;
}
bgstack15