diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-11 19:51:17 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-11 19:51:17 -0400 |
commit | 9f902f3c03fbcd6702f7e206e18aea086e35b70e (patch) | |
tree | 4ec9e77d72eff3b6419855a59ae606f49b4057a9 /src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp | |
parent | Cleanup a bit more of the lumina-terminal. Color support is now in (with "xte... (diff) | |
download | lumina-9f902f3c03fbcd6702f7e206e18aea086e35b70e.tar.gz lumina-9f902f3c03fbcd6702f7e206e18aea086e35b70e.tar.bz2 lumina-9f902f3c03fbcd6702f7e206e18aea086e35b70e.zip |
Get the lumina desktop all setup with a registration system for start-menu-like plugins to determine whether they should respond to a show command, and setup all the systemstart plugins to use this system (will expand later to the appmenu and userbutton plugins as well).
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index d57846e2..f817e0c0 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -33,10 +33,13 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon connect(menu, SIGNAL(aboutToHide()), this, SLOT(updateButtonVisuals()) ); QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes QTimer::singleShot(0, startmenu, SLOT(ReLoadQuickLaunch()) ); + //Setup the global shortcut handling for opening the start menu + connect(QApplication::instance(), SIGNAL(StartButtonActivated()), this, SLOT(shortcutActivated()) ); + LSession::handle()->registerStartButton(this->type()); } LStartButtonPlugin::~LStartButtonPlugin(){ - + LSession::handle()->unregisterStartButton(this->type()); } void LStartButtonPlugin::updateButtonVisuals(){ @@ -117,3 +120,10 @@ void LStartButtonPlugin::openMenu(){ void LStartButtonPlugin::closeMenu(){ menu->hide(); } + +void LStartButtonPlugin::shortcutActivated(){ + if(LSession::handle()->registerStartButton(this->type())){ + if(menu->isVisible()){ closeMenu(); } + else{ openMenu(); } + } +} |