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.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/lumina-fm/main.cpp b/lumina-fm/main.cpp
index 4c23366a..267e6e68 100644
--- a/lumina-fm/main.cpp
+++ b/lumina-fm/main.cpp
@@ -8,10 +8,7 @@
#include <QTextCodec>
#include "MainUI.h"
-
-#ifndef PREFIX
-#define PREFIX QString("/usr/local")
-#endif
+#include "../global.h"
int main(int argc, char ** argv)
{
@@ -33,16 +30,16 @@ int main(int argc, char ** argv)
QTranslator translator;
QLocale mylocale;
QString langCode = mylocale.name();
-
+
if ( ! QFile::exists(PREFIX + "/share/Lumina-DE/i18n/lumina-fm_" + langCode + ".qm" ) ) langCode.truncate(langCode.indexOf("_"));
translator.load( QString("lumina-fm_") + langCode, PREFIX + "/share/i18n/Lumina-DE/" );
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();
-
+
MainUI w;
QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance(const QString&)) );
w.OpenDirs(in);
bgstack15