Merge lp:~mzanetti/unity-api/dashActive into lp:unity-api

Proposed by Michael Zanetti
Status: Merged
Approved by: Gerry Boland
Approved revision: 157
Merged at revision: 160
Proposed branch: lp:~mzanetti/unity-api/dashActive
Merge into: lp:unity-api
Diff against target: 112 lines (+36/-1)
6 files modified
debian/changelog (+6/-0)
include/unity/shell/application/ApplicationManagerInterface.h (+15/-0)
include/unity/shell/application/CMakeLists.txt (+1/-1)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp (+10/-0)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.h (+3/-0)
test/qmltest/unity/shell/application/tst_Application.qml (+1/-0)
To merge this branch: bzr merge lp:~mzanetti/unity-api/dashActive
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Gerry Boland (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+235273@code.launchpad.net

Commit message

add a dashActive property to the application API

Description of the change

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

https://code.launchpad.net/~unity-team/qtmir/fix-some-lifecycle-bugs/+merge/234087
https://code.launchpad.net/~mzanetti/unity8/async-dashcommunicator/+merge/235272

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 * Did you make sure that your branch does not contain spurious tags?
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 * If you changed the UI, has there been a design review?

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) :
review: Approve
lp:~mzanetti/unity-api/dashActive updated
158. By Michael Zanetti

merge trunk

159. By Michael Zanetti

dashActive -> forceDashActive

160. By Michael Zanetti

update mock and test

161. By Michael Zanetti

improve comment

Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-09-22 17:35:28 +0000
3+++ debian/changelog 2014-09-29 13:39:19 +0000
4@@ -1,3 +1,9 @@
5+unity-api (7.92+14.10.20140929-0ubuntu1) UNRELEASED; urgency=medium
6+
7+ * Add dashActive property to application api
8+
9+ -- Michael Zanetti <michael.zanetti@canonical.com> Fri, 29 Sep 2014 13:19:32 +0200
10+
11 unity-api (7.91+14.10.20140922.1-0ubuntu1) utopic; urgency=medium
12
13 [ Daniel d'Andrada ]
14
15=== modified file 'include/unity/shell/application/ApplicationManagerInterface.h'
16--- include/unity/shell/application/ApplicationManagerInterface.h 2014-08-13 18:05:37 +0000
17+++ include/unity/shell/application/ApplicationManagerInterface.h 2014-09-29 13:39:19 +0000
18@@ -66,6 +66,13 @@
19 */
20 Q_PROPERTY(bool suspended READ suspended WRITE setSuspended NOTIFY suspendedChanged)
21
22+ /**
23+ * @brief Activate the dash, regardless of its focused state.
24+ *
25+ * If this is set to true, the dash will not be put to suspend or will be woken up from suspend.
26+ */
27+ Q_PROPERTY(bool forceDashActive READ forceDashActive WRITE setForceDashActive NOTIFY forceDashActiveChanged)
28+
29 protected:
30 /// @cond
31 ApplicationManagerInterface(QObject* parent = 0): QAbstractListModel(parent)
32@@ -117,6 +124,9 @@
33
34 virtual bool suspended() const = 0;
35 virtual void setSuspended(bool suspended) = 0;
36+
37+ virtual bool forceDashActive() const = 0;
38+ virtual void setForceDashActive(bool forceDashActive) = 0;
39 /// @endcond
40
41 /**
42@@ -207,6 +217,11 @@
43 void suspendedChanged();
44
45 /**
46+ * @brief Will be emitted when the forceDashActive property changes.
47+ */
48+ void forceDashActiveChanged();
49+
50+ /**
51 * @brief Will be emitted when an application was added to the model.
52 *
53 * @param appId The appId of the application that was added.
54
55=== modified file 'include/unity/shell/application/CMakeLists.txt'
56--- include/unity/shell/application/CMakeLists.txt 2014-09-03 22:59:26 +0000
57+++ include/unity/shell/application/CMakeLists.txt 2014-09-29 13:39:19 +0000
58@@ -7,7 +7,7 @@
59
60 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
61
62-set(VERSION 4)
63+set(VERSION 5)
64 set(PKGCONFIG_NAME "unity-shell-application")
65 set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")
66 set(PKGCONFIG_REQUIRES "Qt5Core")
67
68=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp'
69--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp 2014-08-13 18:05:37 +0000
70+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.cpp 2014-09-29 13:39:19 +0000
71@@ -108,6 +108,16 @@
72 Q_UNUSED(suspended)
73 }
74
75+bool MockApplicationManager::forceDashActive() const
76+{
77+ return false;
78+}
79+
80+void MockApplicationManager::setForceDashActive(bool forceDashActive)
81+{
82+ Q_UNUSED(forceDashActive)
83+}
84+
85 bool MockApplicationManager::requestFocusApplication(const QString &appId)
86 {
87 Q_UNUSED(appId)
88
89=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.h'
90--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.h 2014-08-13 18:05:37 +0000
91+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationManager.h 2014-09-29 13:39:19 +0000
92@@ -43,6 +43,9 @@
93 bool suspended() const;
94 void setSuspended(bool suspended);
95
96+ bool forceDashActive() const override;
97+ void setForceDashActive(bool forceDashActive) override;
98+
99 Q_INVOKABLE unity::shell::application::ApplicationInfoInterface *get(const int index) const;
100
101 Q_INVOKABLE unity::shell::application::ApplicationInfoInterface *findApplication(const QString &appId) const;
102
103=== modified file 'test/qmltest/unity/shell/application/tst_Application.qml'
104--- test/qmltest/unity/shell/application/tst_Application.qml 2014-09-09 15:20:36 +0000
105+++ test/qmltest/unity/shell/application/tst_Application.qml 2014-09-29 13:39:19 +0000
106@@ -125,6 +125,7 @@
107 { tag: "ApplicationManager.count", property: "count", type: "number" },
108 { tag: "ApplicationManager.focusedApplicationId", property: "focusedApplicationId", type: "string" },
109 { tag: "ApplicationManager.suspended", property: "suspended", type: "boolean" },
110+ { tag: "ApplicationManager.forceDashActive", property: "forceDashActive", type: "boolean" },
111 ];
112 }
113

Subscribers

People subscribed via source and target branches

to all changes: