Merge lp:~mzanetti/unity/8-lockscreen-design-tweaks into lp:unity/8.0

Proposed by Michael Zanetti
Status: Merged
Approved by: Nicolas d'Offay
Approved revision: no longer in the source branch.
Merged at revision: 42
Proposed branch: lp:~mzanetti/unity/8-lockscreen-design-tweaks
Merge into: lp:unity/8.0
Diff against target: 66 lines (+15/-3)
3 files modified
Greeter/Lockscreen.qml (+7/-1)
Shell.qml (+1/-1)
tests/qmltests/Greeter/tst_Lockscreen.qml (+7/-1)
To merge this branch: bzr merge lp:~mzanetti/unity/8-lockscreen-design-tweaks
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Nicolas d'Offay (community) Approve
Review via email: mp+171089@code.launchpad.net

Commit message

don't clear lockscreen directly after login, its still visible in the fading animation. Clear it when it is requested to be shown instead

this also removes a colon that design didn't like and updates tests to make sure the above works

To post a comment you must log in.
Revision history for this message
Nicolas d'Offay (nicolas-doffay) wrote :

On output:
file:///home/phablet/shell/Greeter/Lockscreen.qml:46: TypeError: Cannot call method 'clear' of null

Perhaps also a good idea to add some commentary regarding the reset() function since it's usage looks a bit suspect.

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

> On output:
> file:///home/phablet/shell/Greeter/Lockscreen.qml:46: TypeError: Cannot call
> method 'clear' of null

Fixed. Well spotted!

> Perhaps also a good idea to add some commentary regarding the reset() function
> since it's usage looks a bit suspect.

Done

Revision history for this message
Nicolas d'Offay (nicolas-doffay) wrote :

Looks good to me now!

review: Approve
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
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Greeter/Lockscreen.qml'
2--- Greeter/Lockscreen.qml 2013-06-06 12:18:34 +0000
3+++ Greeter/Lockscreen.qml 2013-06-24 15:37:35 +0000
4@@ -41,7 +41,14 @@
5 signal cancel()
6 signal emergencyCall()
7
8+ onRequiredChanged: {
9+ if (required && pinPadLoader.item) {
10+ pinPadLoader.item.clear(false);
11+ }
12+ }
13+
14 function reset() {
15+ // This causes the loader below to destry and recreate the source
16 pinPadLoader.resetting = true;
17 pinPadLoader.resetting = false;
18 }
19@@ -140,7 +147,6 @@
20 }
21 if (LightDM.Greeter.authenticated) {
22 root.unlocked();
23- pinPadLoader.item.clear(false);
24 } else {
25 pinPadLoader.item.clear(true);
26 }
27
28=== modified file 'Shell.qml'
29--- Shell.qml 2013-06-20 15:24:23 +0000
30+++ Shell.qml 2013-06-24 15:37:35 +0000
31@@ -380,7 +380,7 @@
32 } else {
33 lockscreen.alphaNumeric = true
34 }
35- lockscreen.placeholderText = i18n.tr("Please enter %1:").arg(text);
36+ lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text);
37 lockscreen.show();
38 }
39 }
40
41=== modified file 'tests/qmltests/Greeter/tst_Lockscreen.qml'
42--- tests/qmltests/Greeter/tst_Lockscreen.qml 2013-06-06 12:18:34 +0000
43+++ tests/qmltests/Greeter/tst_Lockscreen.qml 2013-06-24 15:37:35 +0000
44@@ -187,8 +187,8 @@
45 unlockedCheckBox.checked = false
46 LightDM.Greeter.authenticate(data.username)
47
48+ var inputField = findChild(lockscreen, "pinentryField")
49 if (data.alphanumeric) {
50- var inputField = findChild(lockscreen, "pinentryField")
51 mouseClick(inputField, units.gu(1), units.gu(1))
52 typeString(data.password)
53 keyClick(Qt.Key_Enter)
54@@ -200,6 +200,12 @@
55 }
56 }
57 tryCompare(unlockedCheckBox, "checked", data.unlockedSignal)
58+ if (!data.unlockedSignal) {
59+ // make sure the input is cleared on wrong input
60+ tryCompareFunction(function() {return inputField.text.length == 0}, true)
61+ } else {
62+ tryCompareFunction(function() {return inputField.text.length > 0}, true)
63+ }
64 }
65 }
66 }

Subscribers

People subscribed via source and target branches

to all changes: