From d0371bef82a055b52a71706c13c3fab196510354 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 6 Oct 2014 09:55:02 -0400 Subject: 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. --- lumina-config/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lumina-config/main.cpp') diff --git a/lumina-config/main.cpp b/lumina-config/main.cpp index 65f2bf08..415a3c85 100644 --- a/lumina-config/main.cpp +++ b/lumina-config/main.cpp @@ -8,7 +8,7 @@ #include #include "mainUI.h" -#include "../global.h" +#include int main(int argc, char ** argv) { @@ -23,8 +23,8 @@ int main(int argc, char ** argv) QLocale mylocale; QString langCode = mylocale.name(); - if ( ! QFile::exists(PREFIX + "/share/Lumina-DE/i18n/lumina-config_" + langCode + ".qm" ) ) langCode.truncate(langCode.indexOf("_")); - translator.load( QString("lumina-config_") + langCode, PREFIX + "/share/i18n/Lumina-DE/" ); + 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; -- cgit