From 156d29893b12e1a22664ba4b065196b5beec768e Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 9 Sep 2014 10:49:31 -0400 Subject: Update the *.desktop "Exec=" compliance to the standards as of 9/9/2014 in LuminaXDG --- libLumina/LuminaXDG.cpp | 6 +++++- libLumina/LuminaXDG.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp index 8a9696de..8d210abe 100644 --- a/libLumina/LuminaXDG.cpp +++ b/libLumina/LuminaXDG.cpp @@ -235,8 +235,12 @@ QString LXDG::getDesktopExec(XDGDesktop app){ else if(app.useTerminal){ out = "xterm -lc -e "+app.exec; }else{ - out = app.exec; + 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+" "); } return out; } diff --git a/libLumina/LuminaXDG.h b/libLumina/LuminaXDG.h index 0aa469b7..b4c358c2 100644 --- a/libLumina/LuminaXDG.h +++ b/libLumina/LuminaXDG.h @@ -9,6 +9,7 @@ // -- Current Implementation (OCT 2013) -- // Desktop File Version Compliance: 1.0 (except "DBusActivatable") // Icon Theme Compliance: Built in to Qt (QIcon::fromTheme()) with "oxygen" theme default +// *.desktop Exec Compliance Updated: 9/9/2014 //=========================================== -- cgit