diff options
-rw-r--r-- | libLumina/LuminaXDG.cpp | 6 | ||||
-rw-r--r-- | libLumina/LuminaXDG.h | 1 | ||||
-rw-r--r-- | lumina-open/main.cpp | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp index e325329e..ff231034 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 //=========================================== diff --git a/lumina-open/main.cpp b/lumina-open/main.cpp index 9b35e19e..bb8967ba 100644 --- a/lumina-open/main.cpp +++ b/lumina-open/main.cpp @@ -230,7 +230,7 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat //This is a directory link - adjust inputs inFile = DF.path; cmd.clear(); - extension = "directorypath"; + extension = "directory"; }else{ qDebug() << "[ERROR] Input *.desktop directory file is missing the Path line:" << inFile; exit(1); @@ -251,7 +251,7 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat } //qDebug() << "Found Command:" << cmd << "Extension:" << extension; //Clean up the command appropriately for output - if(cmd.contains("%")){cmd = cmd.remove("%U").remove("%u").remove("%F").remove("%f").simplified(); } + if(cmd.contains("%")){cmd = cmd.remove("%U").remove("%u").remove("%F").remove("%f").remove("%i").remove("%c").remove("%k").simplified(); } binary = cmd; if(useInputFile){ args = inFile; } } |