aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-open
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-03-02 09:43:19 -0500
committerKen Moore <ken@ixsystems.com>2017-03-02 09:43:19 -0500
commit33681a12eb754af6f057e8a6984db4af18dc010b (patch)
tree708a16ed1ce3ee80ac6cf1e61c77ccc9ac569b12 /src-qt5/core/lumina-open
parentUpdate the help text for lumina-open to include the "-action <ActionID>" synt... (diff)
downloadlumina-33681a12eb754af6f057e8a6984db4af18dc010b.tar.gz
lumina-33681a12eb754af6f057e8a6984db4af18dc010b.tar.bz2
lumina-33681a12eb754af6f057e8a6984db4af18dc010b.zip
Clean up some of the applauncher context menu functionality:
1) Add the ability for plugins to set their own high-priority context menu, and put the plugin modification menu into that as needed. 2) For the applauncher plugin, generate a custom context menu specifically for the file in question. This may include the various "actions" in .desktop files as appropriate, and also adds shortcuts for launch, open, open-with, file properties, and delete file.
Diffstat (limited to 'src-qt5/core/lumina-open')
-rw-r--r--src-qt5/core/lumina-open/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-open/main.cpp b/src-qt5/core/lumina-open/main.cpp
index 59cb05d9..7434b6c2 100644
--- a/src-qt5/core/lumina-open/main.cpp
+++ b/src-qt5/core/lumina-open/main.cpp
@@ -32,7 +32,7 @@
void printUsageInfo(){
qDebug() << "lumina-open: Application launcher for the Lumina Desktop Environment";
qDebug() << "Description: Given a file (with absolute path) or URL, this utility will try to find the appropriate application with which to open the file. If the file is a *.desktop application shortcut, it will just start the application appropriately. It can also perform a few specific system operations if given special flags.";
- qDebug() << "Usage: lumina-open [-select] <absolute file path or URL> [-action <ActionID>]";
+ qDebug() << "Usage: lumina-open [-select] [-action <ActionID>] <absolute file path or URL>";
qDebug() << " lumina-open [-volumeup, -volumedown, -brightnessup, -brightnessdown]";
qDebug() << " [-select] (optional) flag to bypass any default application settings and show the application selector window";
qDebug() << " [-action <ActionID>] (optional) Flag to run one of the alternate Actions listed in a .desktop registration file rather than the main command.";
@@ -266,8 +266,10 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat
}
switch(DF.type){
case XDGDesktop::APP:
+ qDebug() << "Found .desktop application:" << ActionID;
if(!DF.exec.isEmpty()){
cmd = DF.getDesktopExec(ActionID);
+ qDebug() << "Got command:" << cmd;
if(!DF.path.isEmpty()){ path = DF.path; }
watch = DF.startupNotify || !DF.filePath.contains("/xdg/autostart/");
}else{
@@ -340,7 +342,7 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat
cmd.append(" \""+inFile+"\"");
}
}
- //qDebug() << "Found Command:" << cmd << "Extension:" << extension;
+ qDebug() << "Found Command:" << cmd << "Extension:" << extension;
//Clean up any leftover "Exec" field codes (should have already been replaced earlier)
if(cmd.contains("%")){cmd = cmd.remove("%U").remove("%u").remove("%F").remove("%f").remove("%i").remove("%c").remove("%k").simplified(); }
binary = cmd; //pass this string to the calling function
bgstack15