Merge lp:~azzar1/unity8/fix-quicklist-separators into lp:unity8

Proposed by Andrea Azzarone
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 2664
Merged at revision: 2712
Proposed branch: lp:~azzar1/unity8/fix-quicklist-separators
Merge into: lp:unity8
Diff against target: 181 lines (+29/-8)
12 files modified
debian/control (+3/-3)
plugins/Greeter/Unity/Launcher/CMakeLists.txt (+1/-1)
plugins/Unity/Launcher/CMakeLists.txt (+1/-1)
plugins/Unity/Launcher/launcheritem.cpp (+1/-0)
plugins/Unity/Launcher/quicklistentry.cpp (+11/-0)
plugins/Unity/Launcher/quicklistentry.h (+4/-0)
plugins/Unity/Launcher/quicklistmodel.cpp (+2/-0)
qml/Launcher/LauncherPanel.qml (+1/-0)
tests/mocks/Unity/Launcher/CMakeLists.txt (+1/-1)
tests/mocks/Unity/Launcher/MockQuickListModel.cpp (+2/-0)
tests/plugins/Greeter/Unity/Launcher/CMakeLists.txt (+1/-1)
tests/plugins/Unity/Launcher/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~azzar1/unity8/fix-quicklist-separators
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Albert Astals Cid (community) Approve
Ubuntu Unity PS integration team Pending
Review via email: mp+309558@code.launchpad.net

Commit message

Do not show a divider between each quicklist entry but just between each section, similar to how unity7 does.

Description of the change

Prereq-archive: ppa:ci-train-ppa-service/2202

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

https://code.launchpad.net/~azzar1/unity-api/launcher-quicklist-add-hasSeparator/+merge/309556

* 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?
The design is taken from the last mockup.

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

So at the moment we only show the separator after the name because we have no other "sections"?

review: Needs Information
Revision history for this message
Andrea Azzarone (azzar1) wrote :

> So at the moment we only show the separator after the name because we have no
> other "sections"?

Yep. In the next branch I'm going to add the "open windows" section.

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

Good then

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

 * Did CI run pass? If not, please explain why.
Yes

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2664
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2538/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3344
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1916
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1916
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/1916
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3372
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3225
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3225/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3225
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3225/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3225
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3225/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3225
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3225/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3225
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3225/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3225
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3225/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3225
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3225/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3225
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3225/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3225
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3225/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2538/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-10-24 11:35:31 +0000
3+++ debian/control 2016-10-28 12:09:41 +0000
4@@ -38,7 +38,7 @@
5 libubuntugestures5-private-dev (>= 1.3.2030),
6 libudev-dev,
7 libudm-common-dev,
8- libunity-api-dev (>= 7.119),
9+ libunity-api-dev (>= 7.120),
10 libusermetricsoutput1-dev,
11 # Need those X11 libs touch emulation from mouse events in manual QML tests on a X11 desktop
12 libx11-dev[!arm64 !armhf],
13@@ -128,7 +128,7 @@
14 qtdeclarative5-ubuntu-telephony0.1,
15 qtdeclarative5-ubuntu-web-plugin,
16 ubuntu-system-settings (>= 0.4),
17- unity-launcher-impl-7,
18+ unity-launcher-impl-10,
19 unity8-common (= ${source:Version}),
20 unity8-private (= ${binary:Version}),
21 unity8-private | unity-launcher-impl,
22@@ -224,7 +224,7 @@
23 ${misc:Depends},
24 ${shlibs:Depends},
25 Provides: unity-launcher-impl,
26- unity-launcher-impl-7,
27+ unity-launcher-impl-10,
28 Description: Unity 8 private libs
29 The Unity 8 shell is the primary user interface for Ubuntu devices.
30 .
31
32=== modified file 'plugins/Greeter/Unity/Launcher/CMakeLists.txt'
33--- plugins/Greeter/Unity/Launcher/CMakeLists.txt 2016-05-13 11:14:15 +0000
34+++ plugins/Greeter/Unity/Launcher/CMakeLists.txt 2016-10-28 12:09:41 +0000
35@@ -1,4 +1,4 @@
36-pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=9)
37+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
38 pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
39
40 add_definitions(-DSM_BUSNAME=systemBus)
41
42=== modified file 'plugins/Unity/Launcher/CMakeLists.txt'
43--- plugins/Unity/Launcher/CMakeLists.txt 2016-09-22 20:22:52 +0000
44+++ plugins/Unity/Launcher/CMakeLists.txt 2016-10-28 12:09:41 +0000
45@@ -1,4 +1,4 @@
46-pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=9)
47+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
48 pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
49
50 add_definitions(-DSM_BUSNAME=systemBus)
51
52=== modified file 'plugins/Unity/Launcher/launcheritem.cpp'
53--- plugins/Unity/Launcher/launcheritem.cpp 2016-05-13 11:14:15 +0000
54+++ plugins/Unity/Launcher/launcheritem.cpp 2016-10-28 12:09:41 +0000
55@@ -42,6 +42,7 @@
56 QuickListEntry nameAction;
57 nameAction.setActionId(QStringLiteral("launch_item"));
58 nameAction.setText(m_name);
59+ nameAction.setHasSeparator(true);
60 m_quickList->appendAction(nameAction);
61
62 QuickListEntry pinningAction;
63
64=== modified file 'plugins/Unity/Launcher/quicklistentry.cpp'
65--- plugins/Unity/Launcher/quicklistentry.cpp 2015-06-09 18:37:16 +0000
66+++ plugins/Unity/Launcher/quicklistentry.cpp 2016-10-28 12:09:41 +0000
67@@ -19,6 +19,7 @@
68 #include "quicklistentry.h"
69
70 QuickListEntry::QuickListEntry()
71+ : m_hasSeparator(false)
72 {
73 }
74
75@@ -57,6 +58,16 @@
76 return !m_actionId.isEmpty();
77 }
78
79+void QuickListEntry::setHasSeparator(bool hasSeparator)
80+{
81+ m_hasSeparator = hasSeparator;
82+}
83+
84+bool QuickListEntry::hasSeparator() const
85+{
86+ return m_hasSeparator;
87+}
88+
89 bool QuickListEntry::operator==(const QuickListEntry &other)
90 {
91 return !other.actionId().isEmpty() && other.actionId() == m_actionId;
92
93=== modified file 'plugins/Unity/Launcher/quicklistentry.h'
94--- plugins/Unity/Launcher/quicklistentry.h 2015-06-09 18:37:16 +0000
95+++ plugins/Unity/Launcher/quicklistentry.h 2016-10-28 12:09:41 +0000
96@@ -37,12 +37,16 @@
97
98 bool clickable() const;
99
100+ void setHasSeparator(bool hasSeparator);
101+ bool hasSeparator() const;
102+
103 bool operator==(const QuickListEntry & other);
104
105 private:
106 QString m_actionId;
107 QString m_text;
108 QString m_icon;
109+ bool m_hasSeparator;
110 };
111
112 #endif // QUICKLISTENTRY
113
114=== modified file 'plugins/Unity/Launcher/quicklistmodel.cpp'
115--- plugins/Unity/Launcher/quicklistmodel.cpp 2015-06-09 18:37:16 +0000
116+++ plugins/Unity/Launcher/quicklistmodel.cpp 2016-10-28 12:09:41 +0000
117@@ -79,6 +79,8 @@
118 return m_list.at(index.row()).icon();
119 case RoleClickable:
120 return m_list.at(index.row()).clickable();
121+ case RoleHasSeparator:
122+ return m_list.at(index.row()).hasSeparator();
123 }
124 return QVariant();
125 }
126
127=== modified file 'qml/Launcher/LauncherPanel.qml'
128--- qml/Launcher/LauncherPanel.qml 2016-10-05 11:27:35 +0000
129+++ qml/Launcher/LauncherPanel.qml 2016-10-28 12:09:41 +0000
130@@ -795,6 +795,7 @@
131 highlightColor: !model.clickable ? quickList.color : undefined // make disabled items visually unclickable
132 divider.colorFrom: UbuntuColors.inkstone
133 divider.colorTo: UbuntuColors.inkstone
134+ divider.visible: model.hasSeparator
135
136 Label {
137 id: label
138
139=== modified file 'tests/mocks/Unity/Launcher/CMakeLists.txt'
140--- tests/mocks/Unity/Launcher/CMakeLists.txt 2016-05-13 11:14:15 +0000
141+++ tests/mocks/Unity/Launcher/CMakeLists.txt 2016-10-28 12:09:41 +0000
142@@ -1,4 +1,4 @@
143-pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=9)
144+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
145
146 include_directories(
147 ${CMAKE_CURRENT_SOURCE_DIR}
148
149=== modified file 'tests/mocks/Unity/Launcher/MockQuickListModel.cpp'
150--- tests/mocks/Unity/Launcher/MockQuickListModel.cpp 2015-09-30 13:09:38 +0000
151+++ tests/mocks/Unity/Launcher/MockQuickListModel.cpp 2016-10-28 12:09:41 +0000
152@@ -37,6 +37,8 @@
153 return QLatin1String("copy.png");
154 case RoleClickable:
155 return index.row() == 1 ? false : true;
156+ case RoleHasSeparator:
157+ return index.row() <= 1 ? true : false;
158 }
159 return QVariant();
160 }
161
162=== modified file 'tests/plugins/Greeter/Unity/Launcher/CMakeLists.txt'
163--- tests/plugins/Greeter/Unity/Launcher/CMakeLists.txt 2016-09-22 20:34:05 +0000
164+++ tests/plugins/Greeter/Unity/Launcher/CMakeLists.txt 2016-10-28 12:09:41 +0000
165@@ -1,4 +1,4 @@
166-pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=7)
167+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
168
169 include_directories(
170 ${CMAKE_CURRENT_SOURCE_DIR}
171
172=== modified file 'tests/plugins/Unity/Launcher/CMakeLists.txt'
173--- tests/plugins/Unity/Launcher/CMakeLists.txt 2016-09-22 20:34:05 +0000
174+++ tests/plugins/Unity/Launcher/CMakeLists.txt 2016-10-28 12:09:41 +0000
175@@ -1,5 +1,5 @@
176 pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
177-pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=8)
178+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
179
180 include_directories(
181 ${CMAKE_CURRENT_SOURCE_DIR}

Subscribers

People subscribed via source and target branches