Accepting request 415930 from home:Vogtinator:branches:KDE:Frameworks5
OBS-URL: https://build.opensuse.org/request/show/415930 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=233
This commit is contained in:
parent
e5385cffd7
commit
5889ff84c5
@ -1,74 +0,0 @@
|
|||||||
From 5d5f37798e9f3c8ae64a1a69ace6a1f1bae31440 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Ivan=20=C4=8Cuki=C4=87?= <ivan.cukic@kde.org>
|
|
||||||
Date: Thu, 21 Jul 2016 23:54:26 +0200
|
|
||||||
Subject: [PATCH 05/11] Missing method for activity deletion from plasma script
|
|
||||||
added
|
|
||||||
|
|
||||||
Summary:
|
|
||||||
We have a method to add an activity in plasma script, but
|
|
||||||
not to remove it. This patch fixes this situation.
|
|
||||||
|
|
||||||
Reviewers: garg, davidedmundson, mart
|
|
||||||
|
|
||||||
Reviewed By: davidedmundson, mart
|
|
||||||
|
|
||||||
Subscribers: plasma-devel
|
|
||||||
|
|
||||||
Tags: #plasma
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.kde.org/D2251
|
|
||||||
---
|
|
||||||
shell/scripting/scriptengine.cpp | 17 +++++++++++++++++
|
|
||||||
shell/scripting/scriptengine.h | 1 +
|
|
||||||
2 files changed, 18 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/shell/scripting/scriptengine.cpp b/shell/scripting/scriptengine.cpp
|
|
||||||
index b066c6a708ff6b5cc51f54645337c10b70d71227..628e715d6f3cadba8c616d2f819ff28a86d6e1df 100644
|
|
||||||
--- a/shell/scripting/scriptengine.cpp
|
|
||||||
+++ b/shell/scripting/scriptengine.cpp
|
|
||||||
@@ -189,6 +189,22 @@ QScriptValue ScriptEngine::desktopForScreen(QScriptContext *context, QScriptEngi
|
|
||||||
return env->wrap(env->m_corona->containmentForScreen(screen));
|
|
||||||
}
|
|
||||||
|
|
||||||
+QScriptValue ScriptEngine::removeActivity(QScriptContext *context, QScriptEngine *engine)
|
|
||||||
+{
|
|
||||||
+ if (context->argumentCount() < 0) {
|
|
||||||
+ return context->throwError(i18n("removeActivity required the activity id"));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ const auto id = context->argument(0).toString();
|
|
||||||
+
|
|
||||||
+ KActivities::Controller controller;
|
|
||||||
+ const auto result = controller.removeActivity(id);
|
|
||||||
+
|
|
||||||
+ awaitFuture(result);
|
|
||||||
+
|
|
||||||
+ return QScriptValue();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
QScriptValue ScriptEngine::createActivity(QScriptContext *context, QScriptEngine *engine)
|
|
||||||
{
|
|
||||||
if (context->argumentCount() < 0) {
|
|
||||||
@@ -818,6 +834,7 @@ void ScriptEngine::setupEngine()
|
|
||||||
|
|
||||||
m_scriptSelf.setProperty(QStringLiteral("QRectF"), constructQRectFClass(this));
|
|
||||||
m_scriptSelf.setProperty(QStringLiteral("createActivity"), newFunction(ScriptEngine::createActivity));
|
|
||||||
+ m_scriptSelf.setProperty(QStringLiteral("removeActivity"), newFunction(ScriptEngine::removeActivity));
|
|
||||||
m_scriptSelf.setProperty(QStringLiteral("setCurrentActivity"), newFunction(ScriptEngine::setCurrentActivity));
|
|
||||||
m_scriptSelf.setProperty(QStringLiteral("currentActivity"), newFunction(ScriptEngine::currentActivity));
|
|
||||||
m_scriptSelf.setProperty(QStringLiteral("activities"), newFunction(ScriptEngine::activities));
|
|
||||||
diff --git a/shell/scripting/scriptengine.h b/shell/scripting/scriptengine.h
|
|
||||||
index 6eae8a1b286429759201f56a11f51c7ea9effc55..944744246d0326ebfd35b5e705fb8073da5b8fbd 100644
|
|
||||||
--- a/shell/scripting/scriptengine.h
|
|
||||||
+++ b/shell/scripting/scriptengine.h
|
|
||||||
@@ -74,6 +74,7 @@ private:
|
|
||||||
static QStringList availableActivities(QScriptContext *context, QScriptEngine *engine);
|
|
||||||
|
|
||||||
static QScriptValue createActivity(QScriptContext *context, QScriptEngine *engine);
|
|
||||||
+ static QScriptValue removeActivity(QScriptContext *context, QScriptEngine *engine);
|
|
||||||
static QScriptValue setCurrentActivity(QScriptContext *context, QScriptEngine *engine);
|
|
||||||
static QScriptValue currentActivity(QScriptContext *controller, QScriptEngine *engine);
|
|
||||||
static QScriptValue activities(QScriptContext *context, QScriptEngine *engine);
|
|
||||||
--
|
|
||||||
2.6.6
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 29 18:05:53 UTC 2016 - fabian@ritter-vogt.de
|
||||||
|
|
||||||
|
- Remove 0005-Missing-method-for-activity-deletion-from-plasma-scr.patch
|
||||||
|
Not only unnecessary, but also reverted by later patch.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 28 20:33:35 UTC 2016 - hrvoje.senjan@gmail.com
|
Thu Jul 28 20:33:35 UTC 2016 - hrvoje.senjan@gmail.com
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@ Patch1: require-qt56.diff
|
|||||||
Patch4: plasmashell-disable-windowclosing-on-logout.patch
|
Patch4: plasmashell-disable-windowclosing-on-logout.patch
|
||||||
# PATCHES 100-200 and above are from upstream 5.7 branch
|
# PATCHES 100-200 and above are from upstream 5.7 branch
|
||||||
Patch100: 0002-don-t-try-to-load-layout-before-kamd-starts.patch
|
Patch100: 0002-don-t-try-to-load-layout-before-kamd-starts.patch
|
||||||
Patch101: 0005-Missing-method-for-activity-deletion-from-plasma-scr.patch
|
|
||||||
Patch102: 0006-Treat-IsDemandingAttention-as-IsOnAllVirtualDesktops.patch
|
Patch102: 0006-Treat-IsDemandingAttention-as-IsOnAllVirtualDesktops.patch
|
||||||
Patch103: 0007-apparently-containment-can-be-null.patch
|
Patch103: 0007-apparently-containment-can-be-null.patch
|
||||||
Patch104: 0010-Properly-registering-existing-activities-before-load.patch
|
Patch104: 0010-Properly-registering-existing-activities-before-load.patch
|
||||||
@ -222,7 +221,6 @@ workspace. Development files.
|
|||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101 -p1
|
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
%patch103 -p1
|
%patch103 -p1
|
||||||
%patch104 -p1
|
%patch104 -p1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user