aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-10-11 09:47:41 -0400
committerKen Moore <ken@ixsystems.com>2016-10-11 09:47:41 -0400
commitdfa2c19bfa7c2d58194eac908c008cb8d2b0340d (patch)
treedde4ec9e5440dad52807c8615a6280d2daf6230b /src-qt5
parentAdjust the FreeBSD CPU temperature routine to use the dev.cpu.* values if ava... (diff)
downloadlumina-dfa2c19bfa7c2d58194eac908c008cb8d2b0340d.tar.gz
lumina-dfa2c19bfa7c2d58194eac908c008cb8d2b0340d.tar.bz2
lumina-dfa2c19bfa7c2d58194eac908c008cb8d2b0340d.zip
Add a "launch" option within the context menu for applauncher desktop plugins.
Fixes #272
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-desktop/LXcbEventFilter.cpp2
-rw-r--r--src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.cpp8
-rw-r--r--src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.h1
-rw-r--r--src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp1
4 files changed, 10 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp
index 3c92c050..ca7fb38d 100644
--- a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp
+++ b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp
@@ -48,7 +48,7 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
session->RootSizeChange();
}else if( ((xcb_property_notify_event_t*)ev)->window == QX11Info::appRootWindow() \
&& ( ( ((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_CURRENT_DESKTOP) )){
- qDebug() << "Got Workspace Change";
+ //qDebug() << "Got Workspace Change";
session->emit WorkspaceChanged();
}else if( SysNotifyAtoms.contains( ((xcb_property_notify_event_t*)ev)->atom ) ){
//Update the status/list of all running windows
diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.cpp
index 69505705..545ba430 100644
--- a/src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.cpp
+++ b/src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.cpp
@@ -33,6 +33,12 @@ LDPlugin::LDPlugin(QWidget *parent, QString id) : QFrame(parent){
void LDPlugin::setupMenu(){
menu->clear();
+ //SPECIAL CONTEXT MENU OPTIONS FOR PARTICULAR PLUGIN TYPES
+ if(PLUGID.startsWith("applauncher::")){
+ menu->addAction( LXDG::findIcon("quickopen",""), tr("Launch Item"), this, SIGNAL(PluginActivated()) );
+ menu->addSeparator();
+ }
+ //General Options
menu->addAction( LXDG::findIcon("transform-move",""), tr("Start Moving Item"), this, SLOT(slotStartMove()) );
menu->addAction( LXDG::findIcon("transform-scale",""), tr("Start Resizing Item"), this, SLOT(slotStartResize()) );
menu->addSeparator();
@@ -54,4 +60,4 @@ void LDPlugin::setupMenu(){
}
//Now make sure the plugin is the saved size right away
this->resize( settings->value(prefix+"location/width").toInt(), settings->value(prefix+"location/height").toInt());
-}*/ \ No newline at end of file
+}*/
diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.h b/src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.h
index 27fcaa24..820880ed 100644
--- a/src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.h
+++ b/src-qt5/core/lumina-desktop/desktop-plugins/LDPlugin.h
@@ -106,6 +106,7 @@ signals:
void OpenDesktopMenu();
void CloseDesktopMenu();
void PluginResized();
+ void PluginActivated();
//Signals for communication with the desktop layout system (not generally used by hand)
void StartMoving(QString); //ID of plugin
diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
index b74bbcb3..e9ef78cb 100644
--- a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
+++ b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp
@@ -19,6 +19,7 @@ AppLauncherPlugin::AppLauncherPlugin(QWidget* parent, QString ID) : LDPlugin(par
watcher = new QFileSystemWatcher(this);
connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT( loadButton()) );
+ connect(this, SIGNAL(PluginActivated()), this, SLOT(buttonClicked()) ); //in case they use the context menu to launch it.
QTimer::singleShot(200,this, SLOT(loadButton()) );
}
bgstack15