Merge lp:~lukas-kde/unity8/fixDismissedSIMPinDialog-lp1596076 into lp:unity8

Proposed by Lukáš Tinkl
Status: Merged
Approved by: Michael Zanetti
Approved revision: 2501
Merged at revision: 2586
Proposed branch: lp:~lukas-kde/unity8/fixDismissedSIMPinDialog-lp1596076
Merge into: lp:unity8
Diff against target: 455 lines (+44/-147)
10 files modified
qml/Notifications/Notification.qml (+9/-28)
qml/Notifications/NotificationMenuItemFactory.qml (+0/-3)
qml/Notifications/Notifications.qml (+10/-25)
qml/Shell.qml (+1/-1)
tests/mocks/Unity/Notifications/MockNotificationModel.cpp (+4/-6)
tests/mocks/Unity/Notifications/MockNotificationModel.h (+2/-4)
tests/qmltests/Notifications/tst_Notifications.qml (+6/-23)
tests/qmltests/Notifications/tst_OptionToggle.qml (+1/-16)
tests/qmltests/Notifications/tst_SwipeToAct.qml (+4/-18)
tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml (+7/-23)
To merge this branch: bzr merge lp:~lukas-kde/unity8/fixDismissedSIMPinDialog-lp1596076
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Unity8 CI Bot continuous-integration Needs Fixing
Michał Sawicz Needs Fixing
Josh Arenson Approve
Review via email: mp+298513@code.launchpad.net

Commit message

Fix incorrect SIM PIN dialog position when entering a wrong PIN

Description of the change

Fix incorrect SIM PIN dialog position when entering a wrong PIN

Get rid of the placeholder cruft

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

Yes, https://code.launchpad.net/~lukas-kde/unity-notifications/visibleQueueFixes/+merge/301304

* 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?

N/A

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

N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2496
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1623/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2163
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1145/console
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1145
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1145
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2191
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2098
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2098
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2098
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2089
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2089
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2089
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2089
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2089
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2089
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2089
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2089
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2089
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2089/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Josh Arenson (josharenson) wrote :

* 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.
No, irrelevant

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

FAILED: Continuous integration, rev:2496
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1637/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2179/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2207
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2113
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2113
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2113
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2104
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2104/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2104
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2104/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2104
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2104/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2104
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2104/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2104
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2104/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2104/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2104
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2104/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2104
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2104/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2104
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2104/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

http://imgur.com/a/sLFIh this breaks all notifications - they end up covering the panel

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

Ah - realized one important bit:

It's the fullscreen notification that's then causing the issue - so if you don't trigger a fullscreen one you won't see it.

From lp:unity-notifications/examples, run:

./icon-summary-body.py GOOD
./sd-example-simunlock.py GOOD
./icon-summary-body.py UGLY

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

FAILED: Continuous integration, rev:2498
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1857/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2424
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1317
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1317
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1317
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2452
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2339
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2339
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2339
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2332
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2332/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2332
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2332/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2332
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2332/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2332
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2332/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2332
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2332/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2332
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2332/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2332
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2332/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2332
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2332/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2332
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2332/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2499
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1860/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2428
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1320
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1320/console
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1320
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2456
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2343
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2343
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2343
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2336
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2336/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2336
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2336/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2336
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2336/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2336
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2336/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2336
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2336/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2336
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2336/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2336
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2336/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2336
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2336/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2336
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2336/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2501
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1864/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2436
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1325
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1325
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1325
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2464
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2351
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2351
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2351
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2344
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2344/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2344
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2344/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2344
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2344/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2344
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2344/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2344
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2344/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2344
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2344/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2344
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2344/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2344
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2344/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2344
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2344/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

tested this. seems to work fine now.

review: Approve (testing)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

ok. code looks ok... at least the red stuff :D

review: Approve
2502. By Lukáš Tinkl

stick to primary orientation when showing the SIM PIN notification

2503. By Lukáš Tinkl

merge trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Notifications/Notification.qml'
--- qml/Notifications/Notification.qml 2016-06-17 01:16:21 +0000
+++ qml/Notifications/Notification.qml 2016-08-08 10:15:37 +0000
@@ -55,29 +55,11 @@
55 name: "Ubuntu.Components.Themes.Ambiance"55 name: "Ubuntu.Components.Themes.Ambiance"
56 }56 }
5757
58 signal dismissed()58 readonly property bool expanded: type === Notification.SnapDecision && // expand only snap decisions, if...
5959 (fullscreen || // - it's a fullscreen one
60 readonly property bool expanded: {60 ListView.view.currentIndex === index || // - it's the one the user clicked on
61 var result = false;61 (ListView.view.currentIndex === -1 && index == 0) // - the first one after the user closed the previous one
6262 )
63 if (type === Notification.SnapDecision) {
64 if (ListView.view.currentIndex === index || fullscreen) {
65 result = true;
66 } else {
67 if (ListView.view.count > 2) {
68 if (ListView.view.currentIndex === -1 && index == 1) {
69 result = true;
70 } else {
71 result = false;
72 }
73 } else {
74 result = true;
75 }
76 }
77 }
78
79 return result;
80 }
8163
82 NotificationAudio {64 NotificationAudio {
83 id: sound65 id: sound
@@ -125,7 +107,6 @@
125 notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId));107 notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId));
126108
127 notification.notification.close();109 notification.notification.close();
128 notification.dismissed()
129 }110 }
130111
131 Behavior on x {112 Behavior on x {
@@ -142,9 +123,11 @@
142 if (fullscreen) {123 if (fullscreen) {
143 notification.notification.urgency = Notification.Critical;124 notification.notification.urgency = Notification.Critical;
144 }125 }
126 ListView.view.topmostIsFullscreen = fullscreen;
145 }127 }
146128
147 Behavior on height {129 Behavior on implicitHeight {
130 enabled: !fullscreen
148 UbuntuNumberAnimation {131 UbuntuNumberAnimation {
149 duration: UbuntuAnimation.SnapDuration132 duration: UbuntuAnimation.SnapDuration
150 }133 }
@@ -217,7 +200,6 @@
217 onNameOwnerChanged: {200 onNameOwnerChanged: {
218 if (lastNameOwner !== "" && nameOwner === "" && notification.notification !== undefined) {201 if (lastNameOwner !== "" && nameOwner === "" && notification.notification !== undefined) {
219 notification.notification.close()202 notification.notification.close()
220 notification.dismissed()
221 }203 }
222 lastNameOwner = nameOwner204 lastNameOwner = nameOwner
223 }205 }
@@ -239,7 +221,7 @@
239 if (notification.type === Notification.Interactive) {221 if (notification.type === Notification.Interactive) {
240 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)222 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
241 } else {223 } else {
242 notificationList.currentIndex = index;224 notification.ListView.view.currentIndex = index;
243 }225 }
244 }226 }
245 onReleased: {227 onReleased: {
@@ -443,7 +425,6 @@
443 }425 }
444 onAccepted: {426 onAccepted: {
445 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)427 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
446 notification.dismissed()
447 }428 }
448 }429 }
449 }430 }
450431
=== modified file 'qml/Notifications/NotificationMenuItemFactory.qml'
--- qml/Notifications/NotificationMenuItemFactory.qml 2016-05-27 13:53:23 +0000
+++ qml/Notifications/NotificationMenuItemFactory.qml 2016-08-08 10:15:37 +0000
@@ -151,18 +151,15 @@
151 onEntered: {151 onEntered: {
152 menuModel.changeState(menuIndex, passphrase);152 menuModel.changeState(menuIndex, passphrase);
153 clear(false);153 clear(false);
154 notification.dismissed()
155 }154 }
156155
157 onCancel: {156 onCancel: {
158 menuModel.activate(menuIndex, false);157 menuModel.activate(menuIndex, false);
159 notification.dismissed()
160 }158 }
161159
162 onEmergencyCall: {160 onEmergencyCall: {
163 shell.startLockedApp("dialer-app");161 shell.startLockedApp("dialer-app");
164 menuModel.activate(menuIndex, false);162 menuModel.activate(menuIndex, false);
165 notification.dismissed()
166 }163 }
167164
168 property var extendedData: menuData && menuData.ext || undefined165 property var extendedData: menuData && menuData.ext || undefined
169166
=== modified file 'qml/Notifications/Notifications.qml'
--- qml/Notifications/Notifications.qml 2016-06-01 19:35:04 +0000
+++ qml/Notifications/Notifications.qml 2016-08-08 10:15:37 +0000
@@ -26,7 +26,7 @@
26 objectName: "notificationList"26 objectName: "notificationList"
27 interactive: false27 interactive: false
2828
29 readonly property bool hasNotification: count > 1 // placeholder is index 029 readonly property bool hasNotification: count > 0
30 property real margin30 property real margin
31 property bool hasMouse31 property bool hasMouse
32 property url background: ""32 property url background: ""
@@ -42,17 +42,10 @@
42 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)42 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
43 }43 }
4444
45 readonly property bool topmostIsFullscreen: fullscreenIndex != -145 property bool topmostIsFullscreen: false
46 spacing: topmostIsFullscreen ? 0 : units.gu(1)46 spacing: topmostIsFullscreen ? 0 : units.gu(1)
4747
48 currentIndex: count > 1 ? 1 : -148 currentIndex: -1
49
50 property int fullscreenIndex: -1
51 onFullscreenIndexChanged: {
52 if (fullscreenIndex != -1) {
53 positionViewAtIndex(fullscreenIndex, ListView.Beginning);
54 }
55 }
5649
57 delegate: Notification {50 delegate: Notification {
58 objectName: "notification" + index51 objectName: "notification" + index
@@ -72,25 +65,17 @@
72 hasMouse: notificationList.hasMouse65 hasMouse: notificationList.hasMouse
73 background: notificationList.background66 background: notificationList.background
7467
68 Component.onCompleted: topmostIsFullscreen = false; // async, the factory loader will set fullscreen to true later
69
70 property int theIndex: index
71 onTheIndexChanged: {
72 ListView.view.topmostIsFullscreen = fullscreen; // when we get pushed down by e.g. volume notification
73 }
74
75 // make sure there's no opacity-difference between the several75 // make sure there's no opacity-difference between the several
76 // elements in a notification76 // elements in a notification
77 // FIXME: disabled all transitions because of LP: #1354406 workaround77 // FIXME: disabled all transitions because of LP: #1354406 workaround
78 //layer.enabled: add.running || remove.running || populate.running78 //layer.enabled: add.running || remove.running || populate.running
79
80 onFullscreenChanged: updateListTopMostIsFullscreen();
81
82 function updateListTopMostIsFullscreen() {
83 if (fullscreen) {
84 fullscreenIndex = index;
85 }
86 }
87
88 onDismissed: {
89 if (fullscreenIndex == index) {
90 fullscreenIndex = -1;
91 notificationList.positionViewAtBeginning();
92 }
93 }
94 }79 }
9580
96 // FIXME: disabled all transitions because of LP: #1354406 workaround81 // FIXME: disabled all transitions because of LP: #1354406 workaround
9782
=== modified file 'qml/Shell.qml'
--- qml/Shell.qml 2016-08-03 15:52:10 +0000
+++ qml/Shell.qml 2016-08-08 10:15:37 +0000
@@ -86,7 +86,7 @@
86 if (startingUp) {86 if (startingUp) {
87 // Ensure we don't rotate during start up87 // Ensure we don't rotate during start up
88 return Qt.PrimaryOrientation;88 return Qt.PrimaryOrientation;
89 } else if (greeter && greeter.shown) {89 } else if (showingGreeter || notifications.topmostIsFullscreen) {
90 return Qt.PrimaryOrientation;90 return Qt.PrimaryOrientation;
91 } else if (applicationsDisplayLoader.item) {91 } else if (applicationsDisplayLoader.item) {
92 return shell.orientations.map(applicationsDisplayLoader.item.supportedOrientations);92 return shell.orientations.map(applicationsDisplayLoader.item.supportedOrientations);
9393
=== modified file 'tests/mocks/Unity/Notifications/MockNotificationModel.cpp'
--- tests/mocks/Unity/Notifications/MockNotificationModel.cpp 2016-05-04 20:40:26 +0000
+++ tests/mocks/Unity/Notifications/MockNotificationModel.cpp 2016-08-08 10:15:37 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2015-2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -13,8 +13,6 @@
13 * You should have received a copy of the GNU Lesser General Public License13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *15 *
16 * Authors:
17 * Mirco Mueller <mirco.mueller@canonical.com>
18 */16 */
1917
20#include "MockNotificationModel.h"18#include "MockNotificationModel.h"
@@ -118,10 +116,10 @@
118 }116 }
119}117}
120118
121void MockNotificationModel::removeSecond() {119void MockNotificationModel::removeFirst() {
122 if(m_queue.size() < 2)120 if(m_queue.isEmpty())
123 return;121 return;
124 removeInternal(1);122 removeInternal(0);
125}123}
126124
127void MockNotificationModel::removeInternal(int loc) {125void MockNotificationModel::removeInternal(int loc) {
128126
=== modified file 'tests/mocks/Unity/Notifications/MockNotificationModel.h'
--- tests/mocks/Unity/Notifications/MockNotificationModel.h 2016-05-04 20:39:25 +0000
+++ tests/mocks/Unity/Notifications/MockNotificationModel.h 2016-08-08 10:15:37 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2015-2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -13,8 +13,6 @@
13 * You should have received a copy of the GNU Lesser General Public License13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *15 *
16 * Authors:
17 * Mirco Mueller <mirco.mueller@canonical.com>
18 */16 */
1917
20#ifndef MOCK_NOTIFICATION_MODEL_H18#ifndef MOCK_NOTIFICATION_MODEL_H
@@ -48,7 +46,7 @@
4846
49 Q_INVOKABLE int queued() const;47 Q_INVOKABLE int queued() const;
50 Q_INVOKABLE void remove(const int id);48 Q_INVOKABLE void remove(const int id);
51 Q_INVOKABLE void removeSecond();49 Q_INVOKABLE void removeFirst();
5250
53 int getCount() const;51 int getCount() const;
5452
5553
=== modified file 'tests/qmltests/Notifications/tst_Notifications.qml'
--- tests/qmltests/Notifications/tst_Notifications.qml 2016-06-01 19:35:04 +0000
+++ tests/qmltests/Notifications/tst_Notifications.qml 2016-08-08 10:15:37 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2015-2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -31,21 +31,6 @@
31 height: notificationsRect.height31 height: notificationsRect.height
32 property int index: 032 property int index: 0
3333
34 // add the default/PlaceHolder notification to the model
35 Component.onCompleted: {
36 var component = Qt.createComponent("Notification.qml")
37 var n = component.createObject("notification", {"nid": index++,
38 "type": Notification.PlaceHolder,
39 "hints": {},
40 "summary": "",
41 "body": "",
42 "icon": "",
43 "secondaryIcon": "",
44 "rawActions": []})
45 n.completed.connect(mockModel.onCompleted)
46 mockModel.append(n)
47 }
48
49 Row {34 Row {
50 id: rootRow35 id: rootRow
5136
@@ -157,15 +142,13 @@
157 }142 }
158143
159 function clearNotifications() {144 function clearNotifications() {
160 while(mockModel.count > 1) {145 while(mockModel.count > 0) {
161 remove1stNotification()146 remove1stNotification();
162 }147 }
163 }148 }
164149
165 function remove1stNotification() {150 function remove1stNotification() {
166 if (mockModel.count > 1) {151 mockModel.removeFirst();
167 mockModel.removeSecond()
168 }
169 }152 }
170153
171 Rectangle {154 Rectangle {
@@ -791,13 +774,13 @@
791 waitForRendering(notifications);774 waitForRendering(notifications);
792775
793 // first one should be expanded by default776 // first one should be expanded by default
794 var notification1 = findChild(notifications, "notification1") // 0 is placeholder...777 var notification1 = findChild(notifications, "notification0")
795 verify(!!notification1, "notification wasn't found");778 verify(!!notification1, "notification wasn't found");
796 waitForRendering(notification1);779 waitForRendering(notification1);
797 verify(notification1.expanded);780 verify(notification1.expanded);
798781
799 // click the 2nd one, verify it's now expanded782 // click the 2nd one, verify it's now expanded
800 var notification2 = findChild(notifications, "notification2") // 0 is placeholder...783 var notification2 = findChild(notifications, "notification1")
801 verify(!!notification2, "notification wasn't found");784 verify(!!notification2, "notification wasn't found");
802 waitForRendering(notification2);785 waitForRendering(notification2);
803 mouseClick(notification2);786 mouseClick(notification2);
804787
=== modified file 'tests/qmltests/Notifications/tst_OptionToggle.qml'
--- tests/qmltests/Notifications/tst_OptionToggle.qml 2016-04-07 20:05:50 +0000
+++ tests/qmltests/Notifications/tst_OptionToggle.qml 2016-08-08 10:15:37 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2015 Canonical Ltd.2 * Copyright 2015-2016 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -51,21 +51,6 @@
51 function getRaw(id) {51 function getRaw(id) {
52 return mockNotification.createObject(mockModel)52 return mockNotification.createObject(mockModel)
53 }53 }
54
55 // add the default/PlaceHolder notification to the model
56 Component.onCompleted: {
57 var n = {
58 type: Notification.PlaceHolder,
59 hints: {},
60 summary: "",
61 body: "",
62 icon: "",
63 secondaryIcon: "",
64 actions: []
65 }
66
67 append(n)
68 }
69 }54 }
7055
71 function addSnapDecisionNotification() {56 function addSnapDecisionNotification() {
7257
=== modified file 'tests/qmltests/Notifications/tst_SwipeToAct.qml'
--- tests/qmltests/Notifications/tst_SwipeToAct.qml 2016-04-07 21:33:49 +0000
+++ tests/qmltests/Notifications/tst_SwipeToAct.qml 2016-08-08 10:15:37 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2014, 2015 Canonical, Ltd.2 * Copyright (C) 2014-2016 Canonical, Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by5 * it under the terms of the GNU General Public License as published by
@@ -53,21 +53,6 @@
53 function getRaw(id) {53 function getRaw(id) {
54 return mockNotification.createObject(mockModel)54 return mockNotification.createObject(mockModel)
55 }55 }
56
57 // add the default/PlaceHolder notification to the model
58 Component.onCompleted: {
59 var n = {
60 type: Notification.PlaceHolder,
61 hints: {},
62 summary: "",
63 body: "",
64 icon: "",
65 secondaryIcon: "",
66 actions: []
67 }
68
69 append(n)
70 }
71 }56 }
7257
73 function addSwipeToActNotification() {58 function addSwipeToActNotification() {
@@ -93,8 +78,9 @@
93 }78 }
9479
95 function remove1stNotification() {80 function remove1stNotification() {
96 if (mockModel.count > 0)81 if (mockModel.count > 0) {
97 mockModel.remove(0)82 mockModel.remove(0);
83 }
98 }84 }
9985
100 Rectangle {86 Rectangle {
10187
=== modified file 'tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml'
--- tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml 2016-04-13 14:39:53 +0000
+++ tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml 2016-08-08 10:15:37 +0000
@@ -47,21 +47,6 @@
47 function getRaw(id) {47 function getRaw(id) {
48 return mockNotification.createObject(mockModel)48 return mockNotification.createObject(mockModel)
49 }49 }
50
51 // add the default/PlaceHolder notification to the model
52 Component.onCompleted: {
53 var n = {
54 type: Notification.PlaceHolder,
55 hints: {},
56 summary: "",
57 body: "",
58 icon: "",
59 secondaryIcon: "",
60 actions: []
61 }
62
63 append(n)
64 }
65 }50 }
6651
67 function addSomeSnapDecisionNotifications() {52 function addSomeSnapDecisionNotifications() {
@@ -123,14 +108,13 @@
123 }108 }
124109
125 function clearNotifications() {110 function clearNotifications() {
126 // remove all but the first (PlaceHolder) notification111 mockModel.clear();
127 mockModel.remove(1, mockModel.count - 1)
128 }112 }
129113
130 function removeTopMostNotification() {114 function removeTopMostNotification() {
131 // leave real/first (PlaceHolder) notification untouched115 if (mockModel.count > 0) {
132 if (mockModel.count > 1)116 mockModel.remove(0);
133 mockModel.remove(1)117 }
134 }118 }
135119
136 Rectangle {120 Rectangle {
@@ -205,11 +189,11 @@
205 notifications.forceLayout();189 notifications.forceLayout();
206 waitForRendering(notifications);190 waitForRendering(notifications);
207191
208 var snap_decision = [findChild(notifications, "notification1"),192 var snap_decision = [findChild(notifications, "notification0"),
193 findChild(notifications, "notification1"),
209 findChild(notifications, "notification2"),194 findChild(notifications, "notification2"),
210 findChild(notifications, "notification3"),195 findChild(notifications, "notification3"),
211 findChild(notifications, "notification4"),196 findChild(notifications, "notification4")]
212 findChild(notifications, "notification5")]
213197
214 for (var index = 0; index < snap_decision.length; index++) {198 for (var index = 0; index < snap_decision.length; index++) {
215 verify(snap_decision[index] !== undefined, index + ". snap-decision wasn't found");199 verify(snap_decision[index] !== undefined, index + ". snap-decision wasn't found");

Subscribers

People subscribed via source and target branches