aboutsummaryrefslogtreecommitdiff
path: root/libLumina
diff options
context:
space:
mode:
Diffstat (limited to 'libLumina')
-rw-r--r--libLumina/LuminaSingleApplication.cpp2
-rw-r--r--libLumina/LuminaUtils.cpp8
-rw-r--r--libLumina/LuminaUtils.h1
-rw-r--r--libLumina/LuminaXDG.cpp2
4 files changed, 11 insertions, 2 deletions
diff --git a/libLumina/LuminaSingleApplication.cpp b/libLumina/LuminaSingleApplication.cpp
index d349d57a..30507b5e 100644
--- a/libLumina/LuminaSingleApplication.cpp
+++ b/libLumina/LuminaSingleApplication.cpp
@@ -15,7 +15,7 @@
LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname) : QApplication(argc, argv){
//Load the proper translation systems
- cTrans = LUtils::LoadTranslation(this, appname); //save the translator for later
+ if(appname!="lumina-desktop"){ cTrans = LUtils::LoadTranslation(this, appname); }//save the translator for later
//Initialize a couple convenience internal variables
cfile = QDir::tempPath()+"/.LSingleApp-%1-%2-%3";
QString username = QString(getlogin());
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index 0e836748..cad7f817 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -326,6 +326,14 @@ void LUtils::setLocaleEnv(QString lang, QString msg, QString time, QString num,Q
}
}
+QString LUtils::currentLocale(){
+ QString curr = getenv("LC_ALL");// = QLocale::system();
+ if(curr.isEmpty()){ curr = getenv("LANG"); }
+ if(curr.isEmpty()){ curr = "en_US"; }
+ curr = curr.section(".",0,0); //remove any encodings off the end
+ return curr;
+}
+
double LUtils::DisplaySizeToBytes(QString num){
//qDebug() << "Convert Num to Bytes:" << num;
num = num.toLower().simplified();
diff --git a/libLumina/LuminaUtils.h b/libLumina/LuminaUtils.h
index 90b07962..7b35b09d 100644
--- a/libLumina/LuminaUtils.h
+++ b/libLumina/LuminaUtils.h
@@ -63,6 +63,7 @@ public:
//Other localization shortcuts
static QStringList knownLocales(); //Note: This only lists locales known to Lumina (so the i18n files need to be installed)
static void setLocaleEnv(QString lang, QString msg="", QString time="", QString num="" ,QString money="",QString collate="", QString ctype="");
+ static QString currentLocale();
//Number format conversions
static double DisplaySizeToBytes(QString num); //Turn a display size (like 50M or 50KB) into a double for calculations (bytes)
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp
index b3905aa9..c46a96a8 100644
--- a/libLumina/LuminaXDG.cpp
+++ b/libLumina/LuminaXDG.cpp
@@ -626,7 +626,7 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){
if(version>=1.1){
ico.addFile(srch[i]+":"+iconName+".svg"); //could be loaded/parsed successfully
}else{
- qDebug() << "Old SVG Version file:" << iconName+".svg Theme:" << srch[i];
+ //qDebug() << "Old SVG Version file:" << iconName+".svg Theme:" << srch[i];
//qDebug() << "SVGInfo:" << svginfo;
}
}else{
bgstack15