From 67f52893177748a5158bab013b9dd1b61c5744e0 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 29 Dec 2016 12:57:34 -0500 Subject: Add a new function to the XDGDesktop class: QString generateExec(QStringList inputfiles, QString ActionID); This will automatically evaluate the input file's syntax and adjust as needed for the application to recognize/run the file. Similarly it will perform all the substitutions and such as necessary to end up with a fully-formatted executable command which can easily be launched with QProcess as necessary. --- src-qt5/core/libLumina/LuminaXDG.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/libLumina/LuminaXDG.h') diff --git a/src-qt5/core/libLumina/LuminaXDG.h b/src-qt5/core/libLumina/LuminaXDG.h index 1c86cedb..fbfd6fd4 100644 --- a/src-qt5/core/libLumina/LuminaXDG.h +++ b/src-qt5/core/libLumina/LuminaXDG.h @@ -78,7 +78,9 @@ public: void sync(); //syncronize this structure with the backend file(as listed in the "filePath" variable) bool isValid(bool showAll = true); //See if this is a valid .desktop entry (showAll: don't filter out based on DE exclude/include lists) - QString getDesktopExec(QString ActionID = ""); + QString getDesktopExec(QString ActionID = ""); //Just return the exec field with minimal cleanup + QString generateExec(QStringList inputfiles = QStringList(), QString ActionID = ""); //Format the exec command to account for input files + bool saveDesktopFile(bool merge = true); //This will use the "filePath" variable for where to save the file bool setAutoStarted(bool autostart = true); -- cgit