aboutsummaryrefslogtreecommitdiff
path: root/libLumina
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-09-16 12:44:20 -0400
committerKen Moore <ken@pcbsd.org>2014-09-16 12:44:20 -0400
commit2c67f57d4a0cb05cef2c60755fc6dcffd93d42ee (patch)
treee229bdb96d5fd0042bcb0ddb0b77daafe897e542 /libLumina
parentMake sure to sort applications by name case-insensitively. (diff)
parentMerge pull request #9 from slicer69/master (diff)
downloadlumina-2c67f57d4a0cb05cef2c60755fc6dcffd93d42ee.tar.gz
lumina-2c67f57d4a0cb05cef2c60755fc6dcffd93d42ee.tar.bz2
lumina-2c67f57d4a0cb05cef2c60755fc6dcffd93d42ee.zip
Merge branch 'master' of github.com:pcbsd/lumina
Diffstat (limited to 'libLumina')
-rw-r--r--libLumina/LuminaXDG.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp
index aaf479d7..c5ceadfd 100644
--- a/libLumina/LuminaXDG.cpp
+++ b/libLumina/LuminaXDG.cpp
@@ -20,6 +20,7 @@ XDGDesktop LXDG::loadDesktopFile(QString filePath, bool& ok){
DF.startupNotify=false;
DF.type = XDGDesktop::BAD;
DF.filePath = filePath;
+ DF.exec = DF.tryexec = ""; // just to make sure this is initialized
//Check input file path validity
QFile file(filePath);
if(!file.exists()){ return DF; } //invalid file
@@ -58,8 +59,8 @@ XDGDesktop LXDG::loadDesktopFile(QString filePath, bool& ok){
if(DF.icon.isEmpty() && loc.isEmpty()){ DF.icon = val; }
else if(loc == lang){ DF.icon = val; }
}
- else if(var=="TryExec"){ DF.tryexec = val; }
- else if(var=="Exec"){ DF.exec = val; }
+ else if( (var=="TryExec") && (DF.tryexec.isEmpty()) ) { DF.tryexec = val; }
+ else if( (var=="Exec") && (DF.exec.isEmpty() ) ) { DF.exec = val; } // only take the first Exec command in the file
else if(var=="NoDisplay" && !DF.isHidden){ DF.isHidden = (val.toLower()=="true"); }
else if(var=="Hidden" && !DF.isHidden){ DF.isHidden = (val.toLower()=="true"); }
else if(var=="Categories"){ DF.catList = val.split(";",QString::SkipEmptyParts); }
bgstack15