#include #ifdef __FreeBSD__ #include #endif #include #include #include #include "mainUI.h" #include #include int main(int argc, char ** argv) { #ifndef __FreeBSD__ QApplication a(argc, argv); #else QtSingleApplication a(argc, argv); if( a.isRunning() ) return !(a.sendMessage("show")); #endif LuminaThemeEngine theme(&a); QTranslator translator; QLocale mylocale; QString langCode = mylocale.name(); if ( ! QFile::exists(LOS::LuminaShare()+"i18n/lumina-config_" + langCode + ".qm" ) ) langCode.truncate(langCode.indexOf("_")); translator.load( QString("lumina-config_") + langCode, LOS::LuminaShare()+"i18n/" ); a.installTranslator( &translator ); qDebug() << "Locale:" << langCode; MainUI w; QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance()) ); QObject::connect(&theme, SIGNAL(updateIcons()), &w, SLOT(setupIcons()) ); w.show(); int retCode = a.exec(); return retCode; }