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
1=== modified file 'qml/Notifications/Notification.qml'
2--- qml/Notifications/Notification.qml 2016-06-17 01:16:21 +0000
3+++ qml/Notifications/Notification.qml 2016-08-08 10:15:37 +0000
4@@ -55,29 +55,11 @@
5 name: "Ubuntu.Components.Themes.Ambiance"
6 }
7
8- signal dismissed()
9-
10- readonly property bool expanded: {
11- var result = false;
12-
13- if (type === Notification.SnapDecision) {
14- if (ListView.view.currentIndex === index || fullscreen) {
15- result = true;
16- } else {
17- if (ListView.view.count > 2) {
18- if (ListView.view.currentIndex === -1 && index == 1) {
19- result = true;
20- } else {
21- result = false;
22- }
23- } else {
24- result = true;
25- }
26- }
27- }
28-
29- return result;
30- }
31+ readonly property bool expanded: type === Notification.SnapDecision && // expand only snap decisions, if...
32+ (fullscreen || // - it's a fullscreen one
33+ ListView.view.currentIndex === index || // - it's the one the user clicked on
34+ (ListView.view.currentIndex === -1 && index == 0) // - the first one after the user closed the previous one
35+ )
36
37 NotificationAudio {
38 id: sound
39@@ -125,7 +107,6 @@
40 notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId));
41
42 notification.notification.close();
43- notification.dismissed()
44 }
45
46 Behavior on x {
47@@ -142,9 +123,11 @@
48 if (fullscreen) {
49 notification.notification.urgency = Notification.Critical;
50 }
51+ ListView.view.topmostIsFullscreen = fullscreen;
52 }
53
54- Behavior on height {
55+ Behavior on implicitHeight {
56+ enabled: !fullscreen
57 UbuntuNumberAnimation {
58 duration: UbuntuAnimation.SnapDuration
59 }
60@@ -217,7 +200,6 @@
61 onNameOwnerChanged: {
62 if (lastNameOwner !== "" && nameOwner === "" && notification.notification !== undefined) {
63 notification.notification.close()
64- notification.dismissed()
65 }
66 lastNameOwner = nameOwner
67 }
68@@ -239,7 +221,7 @@
69 if (notification.type === Notification.Interactive) {
70 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
71 } else {
72- notificationList.currentIndex = index;
73+ notification.ListView.view.currentIndex = index;
74 }
75 }
76 onReleased: {
77@@ -443,7 +425,6 @@
78 }
79 onAccepted: {
80 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
81- notification.dismissed()
82 }
83 }
84 }
85
86=== modified file 'qml/Notifications/NotificationMenuItemFactory.qml'
87--- qml/Notifications/NotificationMenuItemFactory.qml 2016-05-27 13:53:23 +0000
88+++ qml/Notifications/NotificationMenuItemFactory.qml 2016-08-08 10:15:37 +0000
89@@ -151,18 +151,15 @@
90 onEntered: {
91 menuModel.changeState(menuIndex, passphrase);
92 clear(false);
93- notification.dismissed()
94 }
95
96 onCancel: {
97 menuModel.activate(menuIndex, false);
98- notification.dismissed()
99 }
100
101 onEmergencyCall: {
102 shell.startLockedApp("dialer-app");
103 menuModel.activate(menuIndex, false);
104- notification.dismissed()
105 }
106
107 property var extendedData: menuData && menuData.ext || undefined
108
109=== modified file 'qml/Notifications/Notifications.qml'
110--- qml/Notifications/Notifications.qml 2016-06-01 19:35:04 +0000
111+++ qml/Notifications/Notifications.qml 2016-08-08 10:15:37 +0000
112@@ -26,7 +26,7 @@
113 objectName: "notificationList"
114 interactive: false
115
116- readonly property bool hasNotification: count > 1 // placeholder is index 0
117+ readonly property bool hasNotification: count > 0
118 property real margin
119 property bool hasMouse
120 property url background: ""
121@@ -42,17 +42,10 @@
122 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
123 }
124
125- readonly property bool topmostIsFullscreen: fullscreenIndex != -1
126+ property bool topmostIsFullscreen: false
127 spacing: topmostIsFullscreen ? 0 : units.gu(1)
128
129- currentIndex: count > 1 ? 1 : -1
130-
131- property int fullscreenIndex: -1
132- onFullscreenIndexChanged: {
133- if (fullscreenIndex != -1) {
134- positionViewAtIndex(fullscreenIndex, ListView.Beginning);
135- }
136- }
137+ currentIndex: -1
138
139 delegate: Notification {
140 objectName: "notification" + index
141@@ -72,25 +65,17 @@
142 hasMouse: notificationList.hasMouse
143 background: notificationList.background
144
145+ Component.onCompleted: topmostIsFullscreen = false; // async, the factory loader will set fullscreen to true later
146+
147+ property int theIndex: index
148+ onTheIndexChanged: {
149+ ListView.view.topmostIsFullscreen = fullscreen; // when we get pushed down by e.g. volume notification
150+ }
151+
152 // make sure there's no opacity-difference between the several
153 // elements in a notification
154 // FIXME: disabled all transitions because of LP: #1354406 workaround
155 //layer.enabled: add.running || remove.running || populate.running
156-
157- onFullscreenChanged: updateListTopMostIsFullscreen();
158-
159- function updateListTopMostIsFullscreen() {
160- if (fullscreen) {
161- fullscreenIndex = index;
162- }
163- }
164-
165- onDismissed: {
166- if (fullscreenIndex == index) {
167- fullscreenIndex = -1;
168- notificationList.positionViewAtBeginning();
169- }
170- }
171 }
172
173 // FIXME: disabled all transitions because of LP: #1354406 workaround
174
175=== modified file 'qml/Shell.qml'
176--- qml/Shell.qml 2016-08-03 15:52:10 +0000
177+++ qml/Shell.qml 2016-08-08 10:15:37 +0000
178@@ -86,7 +86,7 @@
179 if (startingUp) {
180 // Ensure we don't rotate during start up
181 return Qt.PrimaryOrientation;
182- } else if (greeter && greeter.shown) {
183+ } else if (showingGreeter || notifications.topmostIsFullscreen) {
184 return Qt.PrimaryOrientation;
185 } else if (applicationsDisplayLoader.item) {
186 return shell.orientations.map(applicationsDisplayLoader.item.supportedOrientations);
187
188=== modified file 'tests/mocks/Unity/Notifications/MockNotificationModel.cpp'
189--- tests/mocks/Unity/Notifications/MockNotificationModel.cpp 2016-05-04 20:40:26 +0000
190+++ tests/mocks/Unity/Notifications/MockNotificationModel.cpp 2016-08-08 10:15:37 +0000
191@@ -1,5 +1,5 @@
192 /*
193- * Copyright 2015 Canonical Ltd.
194+ * Copyright 2015-2016 Canonical Ltd.
195 *
196 * This program is free software; you can redistribute it and/or modify
197 * it under the terms of the GNU Lesser General Public License as published by
198@@ -13,8 +13,6 @@
199 * You should have received a copy of the GNU Lesser General Public License
200 * along with this program. If not, see <http://www.gnu.org/licenses/>.
201 *
202- * Authors:
203- * Mirco Mueller <mirco.mueller@canonical.com>
204 */
205
206 #include "MockNotificationModel.h"
207@@ -118,10 +116,10 @@
208 }
209 }
210
211-void MockNotificationModel::removeSecond() {
212- if(m_queue.size() < 2)
213+void MockNotificationModel::removeFirst() {
214+ if(m_queue.isEmpty())
215 return;
216- removeInternal(1);
217+ removeInternal(0);
218 }
219
220 void MockNotificationModel::removeInternal(int loc) {
221
222=== modified file 'tests/mocks/Unity/Notifications/MockNotificationModel.h'
223--- tests/mocks/Unity/Notifications/MockNotificationModel.h 2016-05-04 20:39:25 +0000
224+++ tests/mocks/Unity/Notifications/MockNotificationModel.h 2016-08-08 10:15:37 +0000
225@@ -1,5 +1,5 @@
226 /*
227- * Copyright 2015 Canonical Ltd.
228+ * Copyright 2015-2016 Canonical Ltd.
229 *
230 * This program is free software; you can redistribute it and/or modify
231 * it under the terms of the GNU Lesser General Public License as published by
232@@ -13,8 +13,6 @@
233 * You should have received a copy of the GNU Lesser General Public License
234 * along with this program. If not, see <http://www.gnu.org/licenses/>.
235 *
236- * Authors:
237- * Mirco Mueller <mirco.mueller@canonical.com>
238 */
239
240 #ifndef MOCK_NOTIFICATION_MODEL_H
241@@ -48,7 +46,7 @@
242
243 Q_INVOKABLE int queued() const;
244 Q_INVOKABLE void remove(const int id);
245- Q_INVOKABLE void removeSecond();
246+ Q_INVOKABLE void removeFirst();
247
248 int getCount() const;
249
250
251=== modified file 'tests/qmltests/Notifications/tst_Notifications.qml'
252--- tests/qmltests/Notifications/tst_Notifications.qml 2016-06-01 19:35:04 +0000
253+++ tests/qmltests/Notifications/tst_Notifications.qml 2016-08-08 10:15:37 +0000
254@@ -1,5 +1,5 @@
255 /*
256- * Copyright 2015 Canonical Ltd.
257+ * Copyright 2015-2016 Canonical Ltd.
258 *
259 * This program is free software; you can redistribute it and/or modify
260 * it under the terms of the GNU Lesser General Public License as published by
261@@ -31,21 +31,6 @@
262 height: notificationsRect.height
263 property int index: 0
264
265- // add the default/PlaceHolder notification to the model
266- Component.onCompleted: {
267- var component = Qt.createComponent("Notification.qml")
268- var n = component.createObject("notification", {"nid": index++,
269- "type": Notification.PlaceHolder,
270- "hints": {},
271- "summary": "",
272- "body": "",
273- "icon": "",
274- "secondaryIcon": "",
275- "rawActions": []})
276- n.completed.connect(mockModel.onCompleted)
277- mockModel.append(n)
278- }
279-
280 Row {
281 id: rootRow
282
283@@ -157,15 +142,13 @@
284 }
285
286 function clearNotifications() {
287- while(mockModel.count > 1) {
288- remove1stNotification()
289+ while(mockModel.count > 0) {
290+ remove1stNotification();
291 }
292 }
293
294 function remove1stNotification() {
295- if (mockModel.count > 1) {
296- mockModel.removeSecond()
297- }
298+ mockModel.removeFirst();
299 }
300
301 Rectangle {
302@@ -791,13 +774,13 @@
303 waitForRendering(notifications);
304
305 // first one should be expanded by default
306- var notification1 = findChild(notifications, "notification1") // 0 is placeholder...
307+ var notification1 = findChild(notifications, "notification0")
308 verify(!!notification1, "notification wasn't found");
309 waitForRendering(notification1);
310 verify(notification1.expanded);
311
312 // click the 2nd one, verify it's now expanded
313- var notification2 = findChild(notifications, "notification2") // 0 is placeholder...
314+ var notification2 = findChild(notifications, "notification1")
315 verify(!!notification2, "notification wasn't found");
316 waitForRendering(notification2);
317 mouseClick(notification2);
318
319=== modified file 'tests/qmltests/Notifications/tst_OptionToggle.qml'
320--- tests/qmltests/Notifications/tst_OptionToggle.qml 2016-04-07 20:05:50 +0000
321+++ tests/qmltests/Notifications/tst_OptionToggle.qml 2016-08-08 10:15:37 +0000
322@@ -1,5 +1,5 @@
323 /*
324- * Copyright 2015 Canonical Ltd.
325+ * Copyright 2015-2016 Canonical Ltd.
326 *
327 * This program is free software; you can redistribute it and/or modify
328 * it under the terms of the GNU Lesser General Public License as published by
329@@ -51,21 +51,6 @@
330 function getRaw(id) {
331 return mockNotification.createObject(mockModel)
332 }
333-
334- // add the default/PlaceHolder notification to the model
335- Component.onCompleted: {
336- var n = {
337- type: Notification.PlaceHolder,
338- hints: {},
339- summary: "",
340- body: "",
341- icon: "",
342- secondaryIcon: "",
343- actions: []
344- }
345-
346- append(n)
347- }
348 }
349
350 function addSnapDecisionNotification() {
351
352=== modified file 'tests/qmltests/Notifications/tst_SwipeToAct.qml'
353--- tests/qmltests/Notifications/tst_SwipeToAct.qml 2016-04-07 21:33:49 +0000
354+++ tests/qmltests/Notifications/tst_SwipeToAct.qml 2016-08-08 10:15:37 +0000
355@@ -1,5 +1,5 @@
356 /*
357- * Copyright (C) 2014, 2015 Canonical, Ltd.
358+ * Copyright (C) 2014-2016 Canonical, Ltd.
359 *
360 * This program is free software; you can redistribute it and/or modify
361 * it under the terms of the GNU General Public License as published by
362@@ -53,21 +53,6 @@
363 function getRaw(id) {
364 return mockNotification.createObject(mockModel)
365 }
366-
367- // add the default/PlaceHolder notification to the model
368- Component.onCompleted: {
369- var n = {
370- type: Notification.PlaceHolder,
371- hints: {},
372- summary: "",
373- body: "",
374- icon: "",
375- secondaryIcon: "",
376- actions: []
377- }
378-
379- append(n)
380- }
381 }
382
383 function addSwipeToActNotification() {
384@@ -93,8 +78,9 @@
385 }
386
387 function remove1stNotification() {
388- if (mockModel.count > 0)
389- mockModel.remove(0)
390+ if (mockModel.count > 0) {
391+ mockModel.remove(0);
392+ }
393 }
394
395 Rectangle {
396
397=== modified file 'tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml'
398--- tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml 2016-04-13 14:39:53 +0000
399+++ tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml 2016-08-08 10:15:37 +0000
400@@ -47,21 +47,6 @@
401 function getRaw(id) {
402 return mockNotification.createObject(mockModel)
403 }
404-
405- // add the default/PlaceHolder notification to the model
406- Component.onCompleted: {
407- var n = {
408- type: Notification.PlaceHolder,
409- hints: {},
410- summary: "",
411- body: "",
412- icon: "",
413- secondaryIcon: "",
414- actions: []
415- }
416-
417- append(n)
418- }
419 }
420
421 function addSomeSnapDecisionNotifications() {
422@@ -123,14 +108,13 @@
423 }
424
425 function clearNotifications() {
426- // remove all but the first (PlaceHolder) notification
427- mockModel.remove(1, mockModel.count - 1)
428+ mockModel.clear();
429 }
430
431 function removeTopMostNotification() {
432- // leave real/first (PlaceHolder) notification untouched
433- if (mockModel.count > 1)
434- mockModel.remove(1)
435+ if (mockModel.count > 0) {
436+ mockModel.remove(0);
437+ }
438 }
439
440 Rectangle {
441@@ -205,11 +189,11 @@
442 notifications.forceLayout();
443 waitForRendering(notifications);
444
445- var snap_decision = [findChild(notifications, "notification1"),
446+ var snap_decision = [findChild(notifications, "notification0"),
447+ findChild(notifications, "notification1"),
448 findChild(notifications, "notification2"),
449 findChild(notifications, "notification3"),
450- findChild(notifications, "notification4"),
451- findChild(notifications, "notification5")]
452+ findChild(notifications, "notification4")]
453
454 for (var index = 0; index < snap_decision.length; index++) {
455 verify(snap_decision[index] !== undefined, index + ". snap-decision wasn't found");

Subscribers

People subscribed via source and target branches