aboutsummaryrefslogtreecommitdiff
path: root/lumina-search/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-search/main.cpp')
-rw-r--r--lumina-search/main.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/lumina-search/main.cpp b/lumina-search/main.cpp
new file mode 100644
index 00000000..886884d5
--- /dev/null
+++ b/lumina-search/main.cpp
@@ -0,0 +1,29 @@
+#include <QTranslator>
+#include <QtGui/QApplication>
+#include <QDebug>
+#include <QFile>
+
+#include "MainUI.h"
+#include <LuminaOS.h>
+#include <LuminaThemes.h>
+
+int main(int argc, char ** argv)
+{
+ QApplication a(argc, argv);
+ LuminaThemeEngine theme(&a);
+ a.setApplicationName("Search for...");
+ QTranslator translator;
+ QLocale mylocale;
+ QString langCode = mylocale.name();
+
+ if ( ! QFile::exists(LOS::LuminaShare()+"i18n/lumina-search_" + langCode + ".qm" ) ) langCode.truncate(langCode.indexOf("_"));
+ translator.load( QString("lumina-search_") + langCode, LOS::LuminaShare()+"i18n/" );
+ a.installTranslator( &translator );
+ qDebug() << "Locale:" << langCode;
+
+ MainUI w;
+ QObject::connect(&theme,SIGNAL(updateIcons()), &w, SLOT(setupIcons()) );
+ w.show();
+
+ return a.exec();
+}
bgstack15