From 33681a12eb754af6f057e8a6984db4af18dc010b Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 2 Mar 2017 09:43:19 -0500 Subject: 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. --- src-qt5/core/libLumina/LuminaXDG.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/libLumina/LuminaXDG.cpp') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index cbc90f25..f34bc0e8 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -59,7 +59,7 @@ void XDGDesktop::sync(){ if(!CDA.ID.isEmpty()){ actions << CDA; CDA = XDGDesktopAction(); } }else if(line.startsWith("[")){ insection=false; inaction = false; } //Now check if this is the beginning of a section - if(line=="[Desktop Entry]"){ insection=true; continue; } + if(line=="[Desktop Entry]"){ insection=true; continue; } else if(line.startsWith("[Desktop Action ")){ //Grab the ID of the action out of the label CDA.ID = line.section("]",0,0).section("Desktop Action",1,1).simplified(); @@ -131,6 +131,8 @@ void XDGDesktop::sync(){ else{ type = XDGDesktop::BAD; } //Unknown type } } //end reading file + if(!CDA.ID.isEmpty()){ actions << CDA; CDA = XDGDesktopAction(); } //if an action was still being read, add that to the list now + file.clear(); //done with contents of file //If there are OnlyShowIn desktops listed, add them to the name if( !showInList.isEmpty() && !showInList.contains("Lumina", Qt::CaseInsensitive) ){ -- cgit