Merge lp:~macslow/unity-api/set-progress-api into lp:unity-api

Proposed by Mirco Müller
Status: Rejected
Rejected by: Mirco Müller
Proposed branch: lp:~macslow/unity-api/set-progress-api
Merge into: lp:unity-api
Prerequisite: lp:~macslow/unity-api/launcher-icon-wobble
Diff against target: 104 lines (+29/-2)
7 files modified
CMakeLists.txt (+1/-1)
debian/changelog (+6/-0)
include/unity/shell/launcher/CMakeLists.txt (+1/-1)
include/unity/shell/launcher/LauncherModelInterface.h (+13/-0)
test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.cpp (+6/-0)
test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.h (+1/-0)
test/qmltest/unity/shell/launcher/tst_Launcher.qml (+1/-0)
To merge this branch: bzr merge lp:~macslow/unity-api/set-progress-api
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Needs Information
PS Jenkins bot (community) continuous-integration Approve
Lukáš Tinkl Pending
Review via email: mp+262732@code.launchpad.net

This proposal supersedes a proposal from 2015-06-19.

Commit message

Added setProgress-API to LauncherModelInterface to allow applications to change the progress-overlay-bar of a launcher-icon/item.

Description of the change

Added setProgress-API to LauncherModelInterface to allow applications to change the progress-overlay-bar of a launcher-icon/item.

Set lp:~macslow/unity-api/launcher-icon-wobble as prerequisite, thus the API additions spread across this branch and "launcher-icon-wobble" merge in order and there are no API-version-related dependency problems as we move along.

This is is a prerequisite for lp:~macslow/unity8/use-set-progress-api.

To post a comment you must log in.
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

* Are there any related MPs required for this MP to build/function as expected? Please list.

No

* Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

* Did you make sure that your branch does not contain spurious tags?

Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

* If you changed the UI, has there been a design review?

N/A

* Did you have a look at the warnings when running tests? Can they be reduced?

Yes

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Hmm... I don't think we need this change, do we? The Progress is supposed to be set from D-Bus only.

review: Needs Information
Revision history for this message
Mirco Müller (macslow) wrote :

I assumed it had to have a hook in unity-api too.

Revision history for this message
Mirco Müller (macslow) wrote :

Set "Rejected" for now, since we do not really need to expose it via the Unity-API. It will only be needed via DBus.

Unmerged revisions

177. By Mirco Müller

Bumped PkgConfig again to not collide with another API-change pending in another branch.

176. By Mirco Müller

Bumped ChangeLog and PkgConfig.

175. By Mirco Müller

Added LauncherModel::setProgress() API and related test.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-03-10 09:48:43 +0000
3+++ CMakeLists.txt 2015-06-23 14:58:45 +0000
4@@ -131,7 +131,7 @@
5 # API version
6 set(UNITY_API_MAJOR 0)
7 set(UNITY_API_MINOR 1)
8-set(UNITY_API_MICRO 4)
9+set(UNITY_API_MICRO 6)
10 set(UNITY_API_VERSION "${UNITY_API_MAJOR}.${UNITY_API_MINOR}.${UNITY_API_MICRO}")
11
12 # API library
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2015-06-11 09:11:57 +0000
16+++ debian/changelog 2015-06-23 14:58:45 +0000
17@@ -1,3 +1,9 @@
18+unity-api (7.98+15.10.20150611-0ubuntu2) UNRELEASED; urgency=medium
19+
20+ * added setProgress API to LauncherModel interface
21+
22+ -- Mirco Müller (MacSlow) <mirco.mueller@ubuntu.com> Tue, 23 Jun 2015 15:55:37 +0200
23+
24 unity-api (7.97+15.10.20150611-0ubuntu1) wily; urgency=medium
25
26 [ Daniel d'Andrada ]
27
28=== modified file 'include/unity/shell/launcher/CMakeLists.txt'
29--- include/unity/shell/launcher/CMakeLists.txt 2015-02-11 13:41:19 +0000
30+++ include/unity/shell/launcher/CMakeLists.txt 2015-06-23 14:58:45 +0000
31@@ -7,7 +7,7 @@
32
33 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
34
35-set(VERSION 6)
36+set(VERSION 8)
37 set(PKGCONFIG_NAME "unity-shell-launcher")
38 set(PKGCONFIG_DESCRIPTION "Unity shell Launcher APIs")
39 set(PKGCONFIG_REQUIRES "Qt5Core")
40
41=== modified file 'include/unity/shell/launcher/LauncherModelInterface.h'
42--- include/unity/shell/launcher/LauncherModelInterface.h 2015-02-09 17:17:08 +0000
43+++ include/unity/shell/launcher/LauncherModelInterface.h 2015-06-23 14:58:45 +0000
44@@ -138,6 +138,19 @@
45 */
46 Q_INVOKABLE virtual void requestRemove(const QString &appId) = 0;
47
48+ /**
49+ * @brief Pass a progress-value to an item of the model.
50+ *
51+ * A progress-value >= 0 will result in a progress-bar-like element to be displayed
52+ * for an item to inform the user of a time-consuming operation going on (e.g. a
53+ * lengthy calculation or a i/o-heavy task).
54+ *
55+ * Note: A progress-value <= -1 is interpreted as no value set.
56+ *
57+ * @param appId The appId of the item to set the progress-value for.
58+ * @param progress The progress-value itself.
59+ */
60+ Q_INVOKABLE virtual void setProgress(const QString &appId, int progress) = 0;
61
62 /**
63 * @brief Trigger an action from the QuickList
64
65=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.cpp'
66--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.cpp 2015-02-09 17:17:08 +0000
67+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.cpp 2015-06-23 14:58:45 +0000
68@@ -125,6 +125,12 @@
69 Q_UNUSED(actionIndex)
70 }
71
72+void MockLauncherModel::setProgress(const QString &appId, int progress)
73+{
74+ Q_UNUSED(appId)
75+ Q_UNUSED(progress)
76+}
77+
78 void MockLauncherModel::setUser(const QString &user)
79 {
80 Q_UNUSED(user)
81
82=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.h'
83--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.h 2015-02-09 17:17:08 +0000
84+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.h 2015-06-23 14:58:45 +0000
85@@ -44,6 +44,7 @@
86 Q_INVOKABLE void pin(const QString &appId, int index = -1);
87 Q_INVOKABLE void requestRemove(const QString &appId);
88 Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex);
89+ Q_INVOKABLE void setProgress(const QString &appId, int progress);
90 Q_INVOKABLE void setUser(const QString &user);
91
92 unity::shell::application::ApplicationManagerInterface *applicationManager() const;
93
94=== modified file 'test/qmltest/unity/shell/launcher/tst_Launcher.qml'
95--- test/qmltest/unity/shell/launcher/tst_Launcher.qml 2015-02-09 17:17:08 +0000
96+++ test/qmltest/unity/shell/launcher/tst_Launcher.qml 2015-06-23 14:58:45 +0000
97@@ -108,6 +108,7 @@
98 { tag: "Model.methods[pin]", method: "pin" },
99 { tag: "Model.methods[requestRemove]", method: "requestRemove" },
100 { tag: "Model.methods[quickListActionInvoked]", method: "quickListActionInvoked" },
101+ { tag: "Model.methods[setProgress]", method: "setProgress" },
102 { tag: "Model.methods[setUser]", method: "setUser" },
103 ];
104 }

Subscribers

People subscribed via source and target branches

to all changes: