Restore filtering by current activity to the Switch Window action.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D2798
wilder-5.14
Eike Hein 10 years ago
parent b5ded3390f
commit 25e76917d1
  1. 6
      containmentactions/switchwindow/switch.cpp
  2. 4
      containmentactions/switchwindow/switch.h

@ -34,11 +34,17 @@
SwitchWindow::SwitchWindow(QObject *parent, const QVariantList &args)
: Plasma::ContainmentActions(parent, args),
m_activityInfo(new TaskManager::ActivityInfo(this)),
m_tasksModel(new TaskManager::TasksModel(this)),
m_mode(AllFlat),
m_clearOrderTimer(0)
{
m_tasksModel->setGroupMode(TaskManager::TasksModel::GroupDisabled);
m_tasksModel->setActivity(m_activityInfo->currentActivity());
m_tasksModel->setFilterByActivity(true);
connect(m_activityInfo, &TaskManager::ActivityInfo::currentActivityChanged,
this, [this]() { m_tasksModel->setActivity(m_activityInfo->currentActivity()); });
}
SwitchWindow::~SwitchWindow()

@ -23,7 +23,8 @@
#include "ui_config.h"
#include <plasma/containmentactions.h>
// liblegacytaskmanager
// libtaskmanager
#include <activityinfo.h>
#include <tasksmodel.h>
class QAction;
@ -66,6 +67,7 @@ class SwitchWindow : public Plasma::ContainmentActions
};
QList <QAction *> m_actions;
TaskManager::ActivityInfo *m_activityInfo;
TaskManager::TasksModel *m_tasksModel;
Ui::Config m_ui;
MenuMode m_mode;

Loading…
Cancel
Save