diff --git a/app/settings/settingsdialog/tablayoutshandler.cpp b/app/settings/settingsdialog/tablayoutshandler.cpp index 4bf4f7639..9a0c19eab 100644 --- a/app/settings/settingsdialog/tablayoutshandler.cpp +++ b/app/settings/settingsdialog/tablayoutshandler.cpp @@ -38,6 +38,7 @@ #include "../../templates/templatesmanager.h" //! Qt +#include #include #include #include @@ -135,7 +136,7 @@ void TabLayouts::initLayoutMenu() m_activitiesManagerAction->setIcon(QIcon::fromTheme("activities")); m_activitiesManagerAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_A)); connectActionWithButton(m_ui->activitiesButton, m_activitiesManagerAction); - connect(m_activitiesManagerAction, &QAction::triggered, this, &TabLayouts::showActivitiesManager); + connect(m_activitiesManagerAction, &QAction::triggered, this, &TabLayouts::toggleActivitiesManager); m_layoutMenu->addSeparator(); @@ -339,9 +340,13 @@ void TabLayouts::switchLayout() updatePerLayoutButtonsState(); } -void TabLayouts::showActivitiesManager() +void TabLayouts::toggleActivitiesManager() { + QDBusInterface iface("org.kde.plasmashell", "/PlasmaShell", "", QDBusConnection::sessionBus()); + if (iface.isValid()) { + iface.call("toggleActivityManager"); + } } void TabLayouts::toggleEnabledLayout() diff --git a/app/settings/settingsdialog/tablayoutshandler.h b/app/settings/settingsdialog/tablayoutshandler.h index de15034c5..db419e258 100644 --- a/app/settings/settingsdialog/tablayoutshandler.h +++ b/app/settings/settingsdialog/tablayoutshandler.h @@ -93,12 +93,12 @@ private slots: void copyLayout(); void downloadLayout(); void switchLayout(); - void showActivitiesManager(); void importLayout(); void exportLayoutForBackup(); void exportLayoutAsTemplate(); void lockLayout(); void removeLayout(); + void toggleActivitiesManager(); void toggleEnabledLayout(); void detailsLayout();