Merge lp:~unity-team/unity8/fix-1308011 into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Michał Sawicz
Approved revision: 1005
Merged at revision: 1052
Proposed branch: lp:~unity-team/unity8/fix-1308011
Merge into: lp:unity8
Diff against target: 190 lines (+54/-15)
4 files modified
debian/control (+3/-3)
qml/Notifications/Notification.qml (+21/-7)
qml/Notifications/NotificationMenuItemFactory.qml (+12/-3)
qml/Notifications/Notifications.qml (+18/-2)
To merge this branch: bzr merge lp:~unity-team/unity8/fix-1308011
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Michał Sawicz Approve
Mirco Müller (community) Abstain
Review via email: mp+225354@code.launchpad.net

Commit message

Fixes gap at top of sim-unlock/fullscreen notification (point 1.), fixes blocking overlay if underlying UnityMenuModel vanishes from DBus (point 2.). The third bullet-point of the bug-report, lockup of shell-UI, could not be reproduced.

Description of the change

Fixes gap at top of sim-unlock/fullscreen notification (point 1.), fixes blocking overlay if underlying UnityMenuModel vanishes from DBus (point 2.). The third bullet-point of the bug-report, lockup of shell-UI, could not be reproduced.

- Are there any related MPs required for this MP to build/function as expected?
Yes. lp:~larsu/qmenumodel/add-nameowner-property and lp:~macslow/unity-notifications/fix-1308011 need to land first before this can be merged to trunk.

- 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?
Not applicable

- If you changed the UI, has there been a design review?
Not applicable

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Since I also worked on this branch, I should not be a reviewer.

review: Abstain
Revision history for this message
Michał Sawicz (saviq) wrote :

See inline.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Replied to one inline comment

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~unity-team/unity8/fix-1308011 updated
1003. By Mirco Müller

Reverted an accidental commit of a temporary experiment with the sound-hints.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Inline.

review: Needs Fixing
Revision history for this message
Mirco Müller (macslow) :
lp:~unity-team/unity8/fix-1308011 updated
1004. By Mirco Müller

Avoid undefined-assignment warning for QUrl-based source.

Revision history for this message
Mirco Müller (macslow) :
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~unity-team/unity8/fix-1308011 updated
1005. By Mirco Müller

Updated debian/control to require newer version of qmenumodel.

Revision history for this message
Michał Sawicz (saviq) wrote :

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

 * Did CI run pass? If not, please explain why.
New required dependencies.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (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 2014-07-11 08:47:58 +0000
3+++ debian/control 2014-07-15 16:16:00 +0000
4@@ -17,7 +17,7 @@
5 libhud-client2-dev,
6 libpay1-dev,
7 libpulse-dev,
8- libqmenumodel-dev (>= 0.2.7),
9+ libqmenumodel-dev (>= 0.2.8),
10 libqt5xmlpatterns5-dev,
11 libunity-api-dev (>= 7.85),
12 libunity-mir-dev,
13@@ -52,7 +52,7 @@
14
15 Package: indicators-client
16 Architecture: amd64 armhf i386
17-Depends: qmenumodel-qml (>= 0.2.7),
18+Depends: qmenumodel-qml (>= 0.2.8),
19 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.49) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.49),
20 unity8 (= ${binary:Version}),
21 ${misc:Depends},
22@@ -77,7 +77,7 @@
23 libcap2-bin,
24 libglib2.0-bin,
25 libunity-mir1 (>= 0.4),
26- qmenumodel-qml (>= 0.2.7),
27+ qmenumodel-qml (>= 0.2.8),
28 qml-module-qtquick-xmllistmodel,
29 qtdeclarative5-gsettings1.0,
30 qtdeclarative5-ubuntu-settings-components (>= 0.3),
31
32=== modified file 'qml/Notifications/Notification.qml'
33--- qml/Notifications/Notification.qml 2014-07-11 08:50:21 +0000
34+++ qml/Notifications/Notification.qml 2014-07-15 16:16:00 +0000
35@@ -36,7 +36,7 @@
36 property var hints
37 property var notification
38 property color color
39- property bool fullscreen
40+ property bool fullscreen: false
41 property int maxHeight
42 property int margins
43 property Gradient greenGradient : Gradient {
44@@ -48,7 +48,6 @@
45 GradientStop { position: 1.0; color: "#4d4745" }
46 }
47
48- fullscreen: false
49 objectName: "background"
50 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
51
52@@ -80,7 +79,7 @@
53 Audio {
54 id: sound
55 objectName: "sound"
56- source: hints["suppress-sound"] != "" ? hints["sound-file"] : undefined
57+ source: hints["suppress-sound"] != "true" && hints["sound-file"] != undefined ? hints["sound-file"] : ""
58 }
59
60 onOpacityChanged: {
61@@ -159,9 +158,17 @@
62 UnityMenuModel {
63 id: unityMenuModel
64
65+ property string lastNameOwner: ""
66+
67 busName: paths.busName
68 actions: paths.actions
69 menuObjectPath: paths.menuObjectPath
70+ onNameOwnerChanged: {
71+ if (lastNameOwner != "" && nameOwner == "" && notification.notification != undefined) {
72+ notification.notification.close()
73+ }
74+ lastNameOwner = nameOwner
75+ }
76 }
77
78 Behavior on implicitHeight {
79@@ -272,14 +279,18 @@
80 }
81
82 Column {
83+ id: dialogColumn
84 objectName: "dialogListView"
85 spacing: units.gu(2)
86
87 visible: count > 0
88
89- anchors.left: parent.left; anchors.right: parent.right
90- anchors.top: fullscreen ? parent.top : undefined
91- anchors.bottom: fullscreen ? parent.bottom : undefined
92+ anchors {
93+ left: parent.left
94+ right: parent.right
95+ top: fullscreen ? parent.top : undefined
96+ bottom: fullscreen ? parent.bottom : undefined
97+ }
98
99 Repeater {
100 model: unityMenuModel
101@@ -287,7 +298,10 @@
102 NotificationMenuItemFactory {
103 id: menuItemFactory
104
105- anchors.left: parent.left; anchors.right: parent.right
106+ anchors {
107+ left: dialogColumn.left
108+ right: dialogColumn.right
109+ }
110
111 menuModel: unityMenuModel
112 menuData: model
113
114=== modified file 'qml/Notifications/NotificationMenuItemFactory.qml'
115--- qml/Notifications/NotificationMenuItemFactory.qml 2014-06-11 15:36:51 +0000
116+++ qml/Notifications/NotificationMenuItemFactory.qml 2014-07-15 16:16:00 +0000
117@@ -50,7 +50,10 @@
118 Column {
119 spacing: units.gu(2)
120
121- anchors.left: parent.left; anchors.right: parent.right
122+ anchors {
123+ left: parent.left
124+ right: parent.right
125+ }
126
127 Component.onCompleted: {
128 menuModel.loadExtendedAttributes(menuIndex, {"x-echo-mode-password": "bool"});
129@@ -67,7 +70,10 @@
130
131 // TODO using Qt.ImhNoPredictiveText here until lp #1291575 is fixed for ubuntu-ui-toolkit
132 inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
133- anchors.left: parent.left; anchors.right: parent.right
134+ anchors {
135+ left: parent.left
136+ right: parent.right
137+ }
138 echoMode: checkBox.checked ? TextInput.Normal : TextInput.Password
139 height: units.gu(5)
140 onTextChanged: {
141@@ -98,7 +104,10 @@
142 id: pinLock
143
144 Lockscreen {
145- anchors.left: parent.left; anchors.right: parent.right
146+ anchors {
147+ left: parent.left
148+ right: parent.right
149+ }
150 height: menuFactory.maxHeight
151 placeholderText: i18n.tr("Please enter SIM PIN")
152 background: shell.background
153
154=== modified file 'qml/Notifications/Notifications.qml'
155--- qml/Notifications/Notifications.qml 2014-04-10 14:21:48 +0000
156+++ qml/Notifications/Notifications.qml 2014-07-15 16:16:00 +0000
157@@ -36,8 +36,11 @@
158 filterRole: UnityNotifications.ModelInterface.RoleType
159 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
160 }
161- spacing: delegate.fullscreen ? 0 : units.gu(.5)
162-
163+
164+ property bool topmostIsFullscreen: false
165+ spacing: topmostIsFullscreen ? 0 : units.gu(.5)
166+
167+ // FIXME: This doesn't make any sense and results in a binding loop
168 currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
169
170 delegate: Notification {
171@@ -61,6 +64,19 @@
172 // make sure there's no opacity-difference between the several
173 // elements in a notification
174 layer.enabled: add.running || remove.running || populate.running
175+
176+ Component.onCompleted: {
177+ if (index == 1) {
178+ notificationList.topmostIsFullscreen = fullscreen
179+ }
180+ }
181+
182+ onFullscreenChanged: {
183+ // index 1 because 0 is the PlaceHolder...
184+ if (index == 1) {
185+ notificationList.topmostIsFullscreen = fullscreen
186+ }
187+ }
188 }
189
190 populate: Transition {

Subscribers

People subscribed via source and target branches