aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r--src-qt5/core/lumina-desktop/LDesktop.cpp1
-rw-r--r--src-qt5/core/lumina-desktop/LDesktopBackground.cpp2
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp10
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.h3
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp10
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.h3
6 files changed, 26 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp
index 11d99581..134cada1 100644
--- a/src-qt5/core/lumina-desktop/LDesktop.cpp
+++ b/src-qt5/core/lumina-desktop/LDesktop.cpp
@@ -106,6 +106,7 @@ void LDesktop::SystemTerminal(){
LSession::handle()->sessionSettings()->sync(); //make sure it is up to date
QString term = LXDG::findDefaultAppForMime("application/terminal"); //LSession::handle()->sessionSettings()->value("default-terminal","xterm").toString();
if(term.endsWith(".desktop")){ term = "lumina-open \""+term+"\""; }
+ else if(term.isEmpty() || !LUtils::isValidBinary(term)){ term = "xterm"; }
LSession::LaunchApplication(term);
}
diff --git a/src-qt5/core/lumina-desktop/LDesktopBackground.cpp b/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
index bdb6dbab..dadbd848 100644
--- a/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
+++ b/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
@@ -8,7 +8,7 @@
#include <QPainter>
-void LDesktopBackground::paintEvent(QPaintEvent *pe) {
+void LDesktopBackground::paintEvent(QPaintEvent *) {
if (bgPixmap != NULL) {
QPainter painter(this);
painter.setBrush(*bgPixmap);
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp b/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp
index 7c9b7ab0..57e84a1d 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp
@@ -24,6 +24,9 @@ LAppMenuPlugin::LAppMenuPlugin(QWidget *parent, QString id, bool horizontal) : L
connect(LSession::handle()->applicationMenu(), SIGNAL(AppMenuUpdated()), this, SLOT(UpdateMenu()));
QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes
QTimer::singleShot(0,this, SLOT(UpdateMenu()) );
+ //Setup the global shortcut handling for opening the start menu
+ connect(QApplication::instance(), SIGNAL(StartButtonActivated()), this, SLOT(shortcutActivated()) );
+ LSession::handle()->registerStartButton(this->type());
}
LAppMenuPlugin::~LAppMenuPlugin(){
@@ -40,6 +43,13 @@ void LAppMenuPlugin::updateButtonVisuals(){
// ========================
// PRIVATE FUNCTIONS
// ========================
+void LAppMenuPlugin::shortcutActivated(){
+ if(LSession::handle()->registerStartButton(this->type())){
+ if(button->menu()->isVisible()){ button->menu()->hide(); }
+ else{ button->showMenu(); }
+ }
+}
+
void LAppMenuPlugin::LaunchItem(QAction* item){
QString appFile = item->whatsThis();
if(appFile.startsWith("internal::")){
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.h b/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.h
index 36cd8605..659d781f 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.h
+++ b/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.h
@@ -35,6 +35,7 @@ private:
void updateButtonVisuals();
private slots:
+ void shortcutActivated();
void LaunchItem(QAction* item);
void UpdateMenu();
@@ -60,4 +61,4 @@ public slots:
}
};
-#endif \ No newline at end of file
+#endif
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp
index 1fefa304..acb27135 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp
@@ -26,6 +26,10 @@ LUserButtonPlugin::LUserButtonPlugin(QWidget *parent, QString id, bool horizonta
button->setMenu(menu);
connect(menu, SIGNAL(aboutToHide()), this, SLOT(updateButtonVisuals()) );
+ //Setup the global shortcut handling for opening the start menu
+ connect(QApplication::instance(), SIGNAL(StartButtonActivated()), this, SLOT(shortcutActivated()) );
+ LSession::handle()->registerStartButton(this->type());
+
QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes
}
@@ -55,3 +59,9 @@ void LUserButtonPlugin::closeMenu(){
menu->hide();
}
+void LUserButtonPlugin::shortcutActivated(){
+ if(LSession::handle()->registerStartButton(this->type())){
+ if(menu->isVisible()){ closeMenu(); }
+ else{ openMenu(); }
+ }
+}
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.h b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.h
index ca835bfe..8d5e5040 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.h
+++ b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/LUserButton.h
@@ -44,6 +44,7 @@ private:
private slots:
void openMenu();
void closeMenu();
+ void shortcutActivated();
void updateButtonVisuals();
@@ -71,4 +72,4 @@ public slots:
}
};
-#endif \ No newline at end of file
+#endif
bgstack15