aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina
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/libLumina
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/libLumina')
-rw-r--r--src-qt5/core/libLumina/LuminaXDG.cpp4
-rw-r--r--src-qt5/core/libLumina/RootSubWindow.cpp6
2 files changed, 6 insertions, 4 deletions
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) ){
diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp
index 7be89f48..e4c3c4ee 100644
--- a/src-qt5/core/libLumina/RootSubWindow.cpp
+++ b/src-qt5/core/libLumina/RootSubWindow.cpp
@@ -15,7 +15,7 @@ RootSubWindow::RootSubWindow(QMdiArea *root, NativeWindow *win) : QMdiSubWindow(
closing = false;
WinWidget = QWidget::createWindowContainer( WIN->window(), this);
this->setWidget(WinWidget);
- LoadProperties( QList< NativeWindow::Property>() << NativeWindow::WindowFlags << NativeWindow::Title << NativeWindow::Icon \
+ LoadProperties( QList< NativeWindow::Property>() << NativeWindow::Title << NativeWindow::Icon \
<< NativeWindow::MinSize << NativeWindow::MaxSize << NativeWindow::Size );
//Hookup the signals/slots
connect(this, SIGNAL(aboutToActivate()), this, SLOT(aboutToActivate()) );
@@ -89,9 +89,9 @@ void RootSubWindow::propertyChanged(NativeWindow::Property prop, QVariant val){
case NativeWindow::Active:
if(val.toBool()){ this->mdiArea()->setActiveSubWindow(this); }
break;
- case NativeWindow::WindowFlags:
+ /*case NativeWindow::WindowFlags:
this->setWindowFlags( val.value< Qt::WindowFlags >() );
- break;
+ break;*/
default:
qDebug() << "Window Property Unused:" << prop << val;
}
bgstack15