1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 13:33:50 +03:00

add functionality for activities explorer

This commit is contained in:
Michail Vourlakos 2021-02-14 17:07:04 +02:00
parent 684bf9dc80
commit da6478fc8e
2 changed files with 8 additions and 3 deletions

View File

@ -38,6 +38,7 @@
#include "../../templates/templatesmanager.h"
//! Qt
#include <QDBusInterface>
#include <QFileDialog>
#include <QFileInfo>
#include <QMimeData>
@ -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()

View File

@ -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();