Merge lp:~mzanetti/unity-api/launcher-onlyPinned into lp:unity-api

Proposed by Michael Zanetti on 2015-02-09
Status: Merged
Approved by: Michael Terry on 2015-02-09
Approved revision: 166
Merged at revision: 166
Proposed branch: lp:~mzanetti/unity-api/launcher-onlyPinned
Merge into: lp:unity-api
Diff against target: 103 lines (+30/-1)
6 files modified
debian/changelog (+6/-0)
include/unity/shell/launcher/CMakeLists.txt (+1/-1)
include/unity/shell/launcher/LauncherModelInterface.h (+9/-0)
test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.cpp (+10/-0)
test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.h (+3/-0)
test/qmltest/unity/shell/launcher/tst_Launcher.qml (+1/-0)
To merge this branch: bzr merge lp:~mzanetti/unity-api/launcher-onlyPinned
Reviewer Review Type Date Requested Status
Michał Sawicz packaging Approve on 2015-02-11
Michael Terry 2015-02-09 Approve on 2015-02-09
PS Jenkins bot continuous-integration Approve on 2015-02-09
Ubuntu Unity PS integration team packaging 2015-02-09 Pending
Review via email: mp+249096@code.launchpad.net

Commit Message

add an onlyPinned property to the launcher's 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/~mzanetti/unity8/as-based-launcher-for-split-greeter/+merge/244553

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

yes

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

yes

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

n/a

To post a comment you must log in.
Michael Terry (mterry) wrote :

Looks OK to me

review: Approve
Michał Sawicz (saviq) wrote :

Please bump Version in include/unity/shell/launcher/CMakeLists.txt.

review: Needs Fixing
167. By Michael Zanetti on 2015-02-11

bump launcher api version

Michael Zanetti (mzanetti) wrote :

> Please bump Version in include/unity/shell/launcher/CMakeLists.txt.

done

Michał Sawicz (saviq) :
review: Approve (packaging)

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-12-05 10:51:44 +0000
3+++ debian/changelog 2015-02-11 13:41:37 +0000
4@@ -1,3 +1,9 @@
5+unity-api (7.95) UNRELEASED; urgency=medium
6+
7+ * add onlyPinned property to launcher model
8+
9+ -- Michael Zanetti <michael.zanetti@canonical.com> Mon, 09 Feb 2015 18:16:30 +0100
10+
11 unity-api (7.94+15.04.20141205-0ubuntu1) vivid; urgency=medium
12
13 [ Albert Astals Cid ]
14
15=== modified file 'include/unity/shell/launcher/CMakeLists.txt'
16--- include/unity/shell/launcher/CMakeLists.txt 2014-10-06 14:06:42 +0000
17+++ include/unity/shell/launcher/CMakeLists.txt 2015-02-11 13:41:37 +0000
18@@ -7,7 +7,7 @@
19
20 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
21
22-set(VERSION 5)
23+set(VERSION 6)
24 set(PKGCONFIG_NAME "unity-shell-launcher")
25 set(PKGCONFIG_DESCRIPTION "Unity shell Launcher APIs")
26 set(PKGCONFIG_REQUIRES "Qt5Core")
27
28=== modified file 'include/unity/shell/launcher/LauncherModelInterface.h'
29--- include/unity/shell/launcher/LauncherModelInterface.h 2014-10-21 18:03:55 +0000
30+++ include/unity/shell/launcher/LauncherModelInterface.h 2015-02-11 13:41:37 +0000
31@@ -54,6 +54,11 @@
32 Q_PROPERTY(unity::shell::application::ApplicationManagerInterface* applicationManager
33 READ applicationManager WRITE setApplicationManager NOTIFY applicationManagerChanged)
34
35+ /**
36+ * @brief Only show pinned apps, hiding the unpinned running/recent ones.
37+ */
38+ Q_PROPERTY(bool onlyPinned READ onlyPinned WRITE setOnlyPinned NOTIFY onlyPinnedChanged)
39+
40 protected:
41 /// @cond
42 LauncherModelInterface(QObject *parent = 0): QAbstractListModel(parent) {
43@@ -154,6 +159,9 @@
44 virtual unity::shell::application::ApplicationManagerInterface *applicationManager() const = 0;
45 virtual void setApplicationManager(unity::shell::application::ApplicationManagerInterface *applicationManager) = 0;
46
47+ virtual bool onlyPinned() const = 0;
48+ virtual void setOnlyPinned(bool onlyPinned) = 0;
49+
50 virtual QHash<int, QByteArray> roleNames() const
51 {
52 return m_roleNames;
53@@ -163,6 +171,7 @@
54 Q_SIGNALS:
55 /// @cond
56 void applicationManagerChanged();
57+ void onlyPinnedChanged();
58 /// @endcond
59
60 /**
61
62=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.cpp'
63--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.cpp 2014-08-26 13:02:32 +0000
64+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.cpp 2015-02-11 13:41:37 +0000
65@@ -141,3 +141,13 @@
66 {
67 Q_UNUSED(applicationManager)
68 }
69+
70+bool MockLauncherModel::onlyPinned() const
71+{
72+ return false;
73+}
74+
75+void MockLauncherModel::setOnlyPinned(bool onlyPinned)
76+{
77+ Q_UNUSED(onlyPinned)
78+}
79
80=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.h'
81--- test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.h 2013-09-11 15:28:22 +0000
82+++ test/qmltest/mocks/plugins/Unity/Launcher/Mocks/MockLauncherModel.h 2015-02-11 13:41:37 +0000
83@@ -49,6 +49,9 @@
84 unity::shell::application::ApplicationManagerInterface *applicationManager() const;
85 void setApplicationManager(unity::shell::application::ApplicationManagerInterface *applicationManager);
86
87+ bool onlyPinned() const override;
88+ void setOnlyPinned(bool onlyPinned) override;
89+
90 private:
91 int findApp(const QString &appId);
92
93
94=== modified file 'test/qmltest/unity/shell/launcher/tst_Launcher.qml'
95--- test/qmltest/unity/shell/launcher/tst_Launcher.qml 2014-08-26 13:02:32 +0000
96+++ test/qmltest/unity/shell/launcher/tst_Launcher.qml 2015-02-11 13:41:37 +0000
97@@ -121,6 +121,7 @@
98 function test_model_properties_data() {
99 return [
100 { tag: "Model.properties[applicationManager]", property: "applicationManager", type: "unity::shell::application::ApplicationManagerInterface" },
101+ { tag: "Model.properties[onlyPinned]", property: "onlyPinned", type: "boolean" },
102 ];
103 }
104

Subscribers

People subscribed via source and target branches

to all changes: