aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fm/main.cpp')
-rw-r--r--lumina-fm/main.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/lumina-fm/main.cpp b/lumina-fm/main.cpp
index e2f70bc1..760ca7ad 100644
--- a/lumina-fm/main.cpp
+++ b/lumina-fm/main.cpp
@@ -1,11 +1,12 @@
#include <QTranslator>
-#ifdef __FreeBSD__
+/*#ifdef __FreeBSD__
#include <qtsingleapplication.h>
-#endif
-#include <QtGui/QApplication>
+#endif*/
+#include <QApplication>
#include <QDebug>
#include <QFile>
-#include <QTextCodec>
+#include <QStringList>
+//#include <QTextCodec>
#include "MainUI.h"
#include <LuminaOS.h>
@@ -25,32 +26,32 @@ int main(int argc, char ** argv)
}
}
if(in.isEmpty()){ in << QDir::homePath(); }
- #ifdef __FreeBSD__
+ /*#ifdef __FreeBSD__
QtSingleApplication a(argc, argv);
if( a.isRunning() ){
return !(a.sendMessage(in.join("\n")));
}
- #else
+ #else*/
QApplication a(argc, argv);
- #endif
+ qDebug() << "Loaded QApplication";
+ //#endif
a.setApplicationName("Insight File Manager");
LuminaThemeEngine themes(&a);
//Load current Locale
QTranslator translator;
QLocale mylocale;
QString langCode = mylocale.name();
-
if ( ! QFile::exists(LOS::LuminaShare()+"i18n/lumina-fm_" + langCode + ".qm" ) ) langCode.truncate(langCode.indexOf("_"));
translator.load( QString("lumina-fm_") + langCode, LOS::LuminaShare()+"i18n/" );
a.installTranslator( &translator );
qDebug() << "Locale:" << langCode;
//Load current encoding for this locale
- QTextCodec::setCodecForTr( QTextCodec::codecForLocale() ); //make sure to use the same codec
- qDebug() << "Locale Encoding:" << QTextCodec::codecForLocale()->name();
+ //QTextCodec::setCodecForTr( QTextCodec::codecForLocale() ); //make sure to use the same codec
+ //qDebug() << "Locale Encoding:" << QTextCodec::codecForLocale()->name();
MainUI w;
- QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance(const QString&)) );
+ //QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance(const QString&)) );
QObject::connect(&themes, SIGNAL(updateIcons()), &w, SLOT(setupIcons()) );
w.OpenDirs(in);
w.show();
bgstack15