aboutsummaryrefslogtreecommitdiff
path: root/lumina-fileinfo/main.cpp
blob: 1028bbdeef51d2fe9a7891a47cd84ba650515db9 (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
31
#include <QTranslator>
#include <QApplication>
#include <QDebug>
#include <QFile>

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

int main(int argc, char ** argv)
{
  LTHEME::LoadCustomEnvSettings();
  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