aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaXDG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libLumina/LuminaXDG.cpp')
-rw-r--r--libLumina/LuminaXDG.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp
index b58f4326..3940da11 100644
--- a/libLumina/LuminaXDG.cpp
+++ b/libLumina/LuminaXDG.cpp
@@ -254,9 +254,12 @@ QString LXDG::getDesktopExec(XDGDesktop app){
out = app.exec;
}
//Now perform any of the XDG flag substitutions as appropriate (9/2014 standards)
- if(out.contains(" %i ")){ out.replace(" %i ", " --icon "+app.icon+" "); }
- if(out.contains(" %c ")){ out.replace(" %c ", " "+app.name+" "); }
- if(out.contains(" %k ")){ out.replace(" %k ", " "+app.filePath+" "); }
+ if(out.contains("%i")){ out.replace("%i", "--icon \'"+app.icon+"\'"); }
+ if(out.contains("%c")){
+ if(!app.name.isEmpty()){ out.replace("%c", ""+app.name+""); }
+ else if(!app.genericName.isEmpty()){ out.replace(" %c ", ""+app.genericName+""); }
+ }
+ if(out.contains("%k")){ out.replace("%k", "\'"+app.filePath+"\'"); }
return out;
}
bgstack15