1 #include <QApplication>
2 #include <QDebug>
3 #include <QFile>
4 #include <QStringList>
5 #include <QDateTime>
6 
7 #include "MainUI.h"
8 #include <LuminaOS.h>
9 #include <LuminaThemes.h>
10 #include <LUtils.h>
11 #include <LuminaSingleApplication.h>
12 
13 #include "BrowserWidget.h"
14 
main(int argc,char ** argv)15 int main(int argc, char ** argv)
16 {
17     qputenv("QT_NO_GLIB","1");
18     LTHEME::LoadCustomEnvSettings();
19     qsrand(QDateTime::currentMSecsSinceEpoch());
20     LSingleApplication a(argc, argv, "lumina-fm"); //loads translations inside constructor
21       if( !a.isPrimaryProcess()){ return 0; }
22     qDebug() << "Loaded QApplication";
23     a.setApplicationName("Insight File Manager");
24     //LuminaThemeEngine themes(&a);
25 
26     //Get the list of inputs for the initial load
27     QStringList in = a.inputlist; //has fixes for relative paths and such
28     if(in.isEmpty()){ in << QDir::homePath(); }
29     //Start the UI
30     MainUI w;
31     QObject::connect(&a, SIGNAL(InputsAvailable(QStringList)), &w, SLOT(slotSingleInstance(QStringList)) );
32     //QObject::connect(&themes, SIGNAL(updateIcons()), &w, SLOT(setupIcons()) );
33     w.OpenDirs(in);
34     w.show();
35 
36    // TESTING CODE FOR NEW BACKEND
37     /*QMainWindow W;
38       BrowserWidget B("",&W);
39       W.setCentralWidget( &B);
40       B.showDetails(false);
41       B.changeDirectory(in.first());
42     qDebug() << "Show Window";
43     W.show();
44   */
45 
46     int retCode = a.exec();
47     return retCode;
48 }
49