[kwin] Re-enable KActivities support
* KWin lists the activities in the Alt+F3 menu * Kcmrules though looks wrong
This commit is contained in:
parent
a6c47e0314
commit
9414d8f7f1
5 changed files with 14 additions and 9 deletions
|
@ -11,7 +11,7 @@ option(KWIN_BUILD_SCRIPTING "Enable building of KWin with scripting support" ON)
|
|||
option(KWIN_BUILD_KAPPMENU "Enable building of KWin with application menu support" ON)
|
||||
option(KWIN_BUILD_XRENDER_COMPOSITING "Enable building of KWin with XRender Compositing support" ON)
|
||||
option(KWIN_BUILD_OPENGL_1_COMPOSITING "Enable support for OpenGL 1.x, automatically disabled when building for OpenGL ES 2.0" ON)
|
||||
option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" OFF)
|
||||
cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KActivities_FOUND" OFF)
|
||||
option(KWIN_PLASMA_ACTIVE "Enable building KWin for Plasma Active." OFF)
|
||||
|
||||
# Binary name of KWin
|
||||
|
@ -308,7 +308,7 @@ if(KWIN_BUILD_SCRIPTING)
|
|||
endif()
|
||||
|
||||
if(KWIN_BUILD_ACTIVITIES)
|
||||
set(kwin_KDE_LIBS ${kwin_KDE_LIBS} ${KACTIVITIES_LIBRARY})
|
||||
set(kwin_KDE_LIBS ${kwin_KDE_LIBS} KF5::KActivities)
|
||||
endif()
|
||||
|
||||
if(OPENGL_EGL_FOUND)
|
||||
|
|
|
@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "workspace.h"
|
||||
// KDE
|
||||
#include <KDE/KConfigGroup>
|
||||
#include <KDE/KDebug>
|
||||
#include <KActivities/Controller>
|
||||
// Qt
|
||||
#include <QtConcurrentRun>
|
||||
|
@ -221,14 +220,14 @@ typedef QPair<QString, QStringList> CurrentAndList;
|
|||
static AssignedList
|
||||
fetchActivityList(KActivities::Controller *controller, QStringList *target, bool running) // could be member function, but actually it's much simpler this way
|
||||
{
|
||||
return AssignedList(target, running ? controller->listActivities(KActivities::Info::Running) :
|
||||
controller->listActivities());
|
||||
return AssignedList(target, running ? controller->activities(KActivities::Info::Running) :
|
||||
controller->activities());
|
||||
}
|
||||
|
||||
static CurrentAndList
|
||||
fetchActivityListAndCurrent(KActivities::Controller *controller)
|
||||
{
|
||||
QStringList l = controller->listActivities();
|
||||
QStringList l = controller->activities();
|
||||
QString c = controller->currentActivity();
|
||||
return CurrentAndList(c, l);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,10 @@ set(kcm_libs
|
|||
${X11_LIBRARIES}
|
||||
)
|
||||
|
||||
if(KWIN_BUILD_ACTIVITIES)
|
||||
set(kcm_libs ${kcm_libs} KF5::KActivities)
|
||||
endif()
|
||||
|
||||
target_link_libraries(kdeinit_kwin_rules_dialog ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS})
|
||||
|
||||
install(TARGETS kdeinit_kwin_rules_dialog ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <QRegExp>
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#include <KActivities/Consumer>
|
||||
#include <kactivities/consumer.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -152,8 +152,9 @@ RulesWidget::RulesWidget(QWidget* parent)
|
|||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
static KActivities::Consumer activities;
|
||||
foreach (const QString & activityId, activities.listActivities()) {
|
||||
activity->addItem(KActivities::Info::name(activityId), activityId);
|
||||
foreach (const QString & activityId, activities.activities()) {
|
||||
const KActivities::Info info(activityId);
|
||||
activity->addItem(info.name(), activityId);
|
||||
}
|
||||
// cloned from kactivities/src/lib/core/consumer.cpp
|
||||
#define NULL_UUID "00000000-0000-0000-0000-000000000000"
|
||||
|
|
|
@ -71,6 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QLayout>
|
||||
#include <QMenu>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidgetAction>
|
||||
#include <kauthorized.h>
|
||||
|
||||
#include "killwindow.h"
|
||||
|
|
Loading…
Reference in a new issue