aboutsummaryrefslogtreecommitdiff
path: root/lumina-screenshot/main.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-10-06 09:55:02 -0400
committerKen Moore <ken@pcbsd.org>2014-10-06 09:55:02 -0400
commitd0371bef82a055b52a71706c13c3fab196510354 (patch)
tree228da7d2fb8c15ffcfb09e3499661d3471ad2d26 /lumina-screenshot/main.cpp
parentMerge pull request #14 from Nanolx/master (diff)
downloadlumina-d0371bef82a055b52a71706c13c3fab196510354.tar.gz
lumina-d0371bef82a055b52a71706c13c3fab196510354.tar.bz2
lumina-d0371bef82a055b52a71706c13c3fab196510354.zip
Clean up the new global.h usage in all the Lumina subprojects.
1) Move the global.h file usage into libLumina exclusively 2) Define a new "LuminaOS::LuminaShare()" function for retrieving the install directory for Lumina (based on the PREFIX/global.h) 3) Change all the other lumina sub directories/projects to use the new LuminaShare() function when necessary. 4) This also fixes up the loading of translations in many of the subprojects (found a bug in the path used in a number of them). Reason: Previous implementation *only* worked if you built lumina from the base directory, causing problems with rebuilding individual pieces of Lumina. This also cleans up the general lumina projects as they only need the LuminaOS class loaded instead of knowing about this other possible OS implementation.
Diffstat (limited to 'lumina-screenshot/main.cpp')
-rw-r--r--lumina-screenshot/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lumina-screenshot/main.cpp b/lumina-screenshot/main.cpp
index 40d7242d..0b564f71 100644
--- a/lumina-screenshot/main.cpp
+++ b/lumina-screenshot/main.cpp
@@ -4,7 +4,7 @@
#include <QFile>
#include "MainUI.h"
-#include "../global.h"
+#include <LuminaOS.h>
int main(int argc, char ** argv)
{
@@ -14,8 +14,8 @@ int main(int argc, char ** argv)
QLocale mylocale;
QString langCode = mylocale.name();
- if ( ! QFile::exists(PREFIX + "/share/Lumina-DE/i18n/lumina-screenshot_" + langCode + ".qm" ) ) langCode.truncate(langCode.indexOf("_"));
- translator.load( QString("lumina-screenshot_") + langCode, PREFIX + "/share/i18n/Lumina-DE/" );
+ if ( ! QFile::exists(LOS::LuminaShare()+"i18n/lumina-screenshot_" + langCode + ".qm" ) ) langCode.truncate(langCode.indexOf("_"));
+ translator.load( QString("lumina-screenshot_") + langCode, LOS::LuminaShare()+"i18n/" );
a.installTranslator( &translator );
qDebug() << "Locale:" << langCode;
bgstack15