on xenial help sign in
Implement new lockscreen designs
ce17b65Michael Zanetti
po/unity8.pot+31−35
@@ -8,7 +8,7 @@ msgid ""
8msgstr ""
8msgstr ""
9"Project-Id-Version: unity8\n"
9"Project-Id-Version: unity8\n"
10"Report-Msgid-Bugs-To: \n"
10"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2014-08-13 14:09-0400\n"
11+"POT-Creation-Date: 2014-08-21 11:36+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -92,19 +92,19 @@ msgid ""
92"phone<br><br>Tap on the screen to start"
92"phone<br><br>Tap on the screen to start"
93msgstr ""
93msgstr ""
94
94
95−#: qml/Components/Lockscreen.qml:161
95+#: qml/Components/Lockscreen.qml:167
96−msgid "Too many incorrect attempts"
96+msgid "Please wait"
97msgstr ""
97msgstr ""
98
98
99−#: qml/Components/Lockscreen.qml:163
99+#: qml/Components/Lockscreen.qml:172
100−msgid "Please wait"
100+msgid "Too many incorrect attempts"
101msgstr ""
101msgstr ""
102
102
103−#: qml/Components/Lockscreen.qml:245
103+#: qml/Components/Lockscreen.qml:206
104msgid "Emergency Call"
104msgid "Emergency Call"
105msgstr ""
105msgstr ""
106
106
107−#: qml/Components/Lockscreen.qml:268
107+#: qml/Components/Lockscreen.qml:226
108msgid "OK"
108msgid "OK"
109msgstr ""
109msgstr ""
110
110
@@ -117,23 +117,15 @@ msgstr ""
117msgid "Hello"
117msgid "Hello"
118msgstr ""
118msgstr ""
119
119
120−#: qml/Components/PinLockscreen.qml:197
121−msgid "CANCEL"
122−msgstr ""
123−
124−#: qml/Components/PinLockscreen.qml:215
125−msgid "DONE"
126−msgstr ""
127−
128−#: qml/Dash/GenericScopeView.qml:360
120+#: qml/Dash/GenericScopeView.qml:361
129msgid "See less"
121msgid "See less"
130msgstr ""
122msgstr ""
131
123
132−#: qml/Dash/GenericScopeView.qml:360
124+#: qml/Dash/GenericScopeView.qml:361
133msgid "See all"
125msgid "See all"
134msgstr ""
126msgstr ""
135
127
136−#: qml/Dash/GenericScopeView.qml:423 qml/Panel/SearchIndicator.qml:27
128+#: qml/Dash/GenericScopeView.qml:424 qml/Panel/SearchIndicator.qml:27
137msgid "Search"
129msgid "Search"
138msgstr ""
130msgstr ""
139
131
@@ -201,12 +193,16 @@ msgstr ""
201msgid "Speaking..."
193msgid "Speaking..."
202msgstr ""
194msgstr ""
203
195
204−#: qml/Notifications/NotificationMenuItemFactory.qml:100
196+#: qml/Notifications/NotificationMenuItemFactory.qml:105
205msgid "Show password"
197msgid "Show password"
206msgstr ""
198msgstr ""
207
199
208−#: qml/Notifications/NotificationMenuItemFactory.qml:115
200+#: qml/Notifications/NotificationMenuItemFactory.qml:120
209−msgid "Please enter SIM PIN"
201+msgid "Enter SIM PIN"
202+msgstr ""
203+
204+#: qml/Notifications/NotificationMenuItemFactory.qml:121 qml/Shell.qml:270
205+msgid "Sorry, incorrect PIN"
210msgstr ""
206msgstr ""
211
207
212#: qml/Panel/ActiveCallHint.qml:77
208#: qml/Panel/ActiveCallHint.qml:77
@@ -249,47 +245,47 @@ msgstr ""
249msgid "Roaming"
245msgid "Roaming"
250msgstr ""
246msgstr ""
251
247
252−#: qml/Shell.qml:267
248+#: qml/Shell.qml:266
253−msgid "passphrase"
249+msgid "Enter your passphrase"
254msgstr ""
250msgstr ""
255
251
256#: qml/Shell.qml:267
252#: qml/Shell.qml:267
257−msgid "passcode"
253+msgid "Sorry, incorrect passphrase"
258msgstr ""
254msgstr ""
259
255
260#: qml/Shell.qml:269
256#: qml/Shell.qml:269
261−#, qt-format
262−msgid "Enter your %1"
257+msgid "Enter your PIN"
263msgstr ""
258msgstr ""
264
259
265−#: qml/Shell.qml:270
260+#: qml/Shell.qml:273
266#, qt-format
261#, qt-format
267−msgid "Incorrect %1"
262+msgid "Enter your %1"
268msgstr ""
263msgstr ""
269
264
270−#: qml/Shell.qml:272
265+#: qml/Shell.qml:274
271−msgid "Please re-enter"
266+#, qt-format
267+msgid "Sorry, incorrect %1"
272msgstr ""
268msgstr ""
273
269
274−#: qml/Shell.qml:306
270+#: qml/Shell.qml:310
275msgid "Sorry, incorrect passphrase."
271msgid "Sorry, incorrect passphrase."
276msgstr ""
272msgstr ""
277
273
278−#: qml/Shell.qml:307
274+#: qml/Shell.qml:311
279msgid "Sorry, incorrect passcode."
275msgid "Sorry, incorrect passcode."
280msgstr ""
276msgstr ""
281
277
282−#: qml/Shell.qml:308
278+#: qml/Shell.qml:312
283msgid "This will be your last attempt."
279msgid "This will be your last attempt."
284msgstr ""
280msgstr ""
285
281
286−#: qml/Shell.qml:310
282+#: qml/Shell.qml:314
287msgid ""
283msgid ""
288"If passphrase is entered incorrectly, your phone will conduct a factory "
284"If passphrase is entered incorrectly, your phone will conduct a factory "
289"reset and all personal data will be deleted."
285"reset and all personal data will be deleted."
290msgstr ""
286msgstr ""
291
287
292−#: qml/Shell.qml:311
288+#: qml/Shell.qml:315
293msgid ""
289msgid ""
294"If passcode is entered incorrectly, your phone will conduct a factory reset "
290"If passcode is entered incorrectly, your phone will conduct a factory reset "
295"and all personal data will be deleted."
291"and all personal data will be deleted."
qml/Components/Lockscreen.qml+33−75
@@ -24,15 +24,14 @@ Showable {
24 // Determine if a numeric or alphanumeric pad is used.
24 // Determine if a numeric or alphanumeric pad is used.
25 property bool alphaNumeric: false
25 property bool alphaNumeric: false
26
26
27− // Placeholder text
27+ // Informational text. (e.g. some text to tell which domain this is pin is entered for)
28− property string placeholderText: ""
29− // Placeholder text while shaking (e.g. Incorrect passprase)
30− property string wrongPlaceholderText: ""
28+ property string infoText: ""
29+
31 // Retries text (e.g. 3 retries left)
30 // Retries text (e.g. 3 retries left)
32 property string retryText: ""
31 property string retryText: ""
33
32
34− // Informational text. (e.g. some text to tell which domain this is pin is entered for.
33+ // The text to be displayed in case the login failed
35− property string infoText: ""
34+ property string errorText: ""
36
35
37 // In case the Lockscreen can show a greeter message, this is the username
36 // In case the Lockscreen can show a greeter message, this is the username
38 property string username: ""
37 property string username: ""
@@ -110,41 +109,6 @@ Showable {
110 anchors.fill: root
109 anchors.fill: root
111 }
110 }
112
111
113− Column {
114− spacing: units.gu(2)
115− anchors {
116− left: parent.left
117− right: parent.right
118− bottom: pinPadLoader.top
119− bottomMargin: units.gu(2)
120− }
121− Label {
122− objectName: "retryCountLabel"
123− anchors {
124− left: parent.left
125− right: parent.right
126− }
127− text: root.retryText
128− horizontalAlignment: Text.AlignHCenter
129− color: "#f3f3e7"
130− opacity: 0.6
131− visible: root.retryText.length > 0
132− }
133− Label {
134− id: infoTextLabel
135− objectName: "infoTextLabel"
136− anchors {
137− left: parent.left
138− right: parent.right
139− }
140− text: root.infoText
141− horizontalAlignment: Text.AlignHCenter
142− color: "#f3f3e7"
143− opacity: 0.6
144− visible: root.infoText.length > 0
145− }
146− }
147−
148 Loader {
112 Loader {
149 id: pinPadLoader
113 id: pinPadLoader
150 objectName: "pinPadLoader"
114 objectName: "pinPadLoader"
@@ -152,21 +116,22 @@ Showable {
152 left: parent.left
116 left: parent.left
153 right: parent.right
117 right: parent.right
154 verticalCenter: parent.verticalCenter
118 verticalCenter: parent.verticalCenter
155− verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : -units.gu(4)
119+ verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : 0
156 }
120 }
157 property bool resetting: false
121 property bool resetting: false
158 property bool waiting: false
122 property bool waiting: false
159 property bool showWrongText: false
123 property bool showWrongText: false
160
124
161− readonly property string forcedDelayText: i18n.tr("Too many incorrect attempts") +
162− "\n" +
163− i18n.tr("Please wait")
164−
165 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
125 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
166 onSourceChanged: {
126 onSourceChanged: {
167 waiting = false
127 waiting = false
168 showWrongText = false
128 showWrongText = false
169 }
129 }
130+ onLoaded: {
131+ if (forcedDelayTimer.running) {
132+ pinPadLoader.item.clear(true)
133+ }
134+ }
170
135
171 Connections {
136 Connections {
172 target: pinPadLoader.item
137 target: pinPadLoader.item
@@ -193,10 +158,19 @@ Showable {
193 }
158 }
194 Binding {
159 Binding {
195 target: pinPadLoader.item
160 target: pinPadLoader.item
196− property: "placeholderText"
161+ property: "infoText"
162+ value: root.infoText
163+ }
164+ Binding {
165+ target: pinPadLoader.item
166+ property: "retryText"
197− value: forcedDelayTimer.running ? pinPadLoader.forcedDelayText :
167+ value: forcedDelayTimer.running ? i18n.tr("Please wait") : root.retryText
168+ }
169+ Binding {
170+ target: pinPadLoader.item
171+ property: "errorText"
172+ value: forcedDelayTimer.running ? i18n.tr("Too many incorrect attempts") :
198− (pinPadLoader.showWrongText ? root.wrongPlaceholderText :
173+ (pinPadLoader.showWrongText ? root.errorText : "")
199− root.placeholderText)
200 }
174 }
201 Binding {
175 Binding {
202 target: pinPadLoader.item
176 target: pinPadLoader.item
@@ -210,8 +184,9 @@ Showable {
210 }
184 }
211 }
185 }
212
186
213− Column {
187+ Label {
214− id: emergencyCallColumn
188+ id: emergencyCallLabel
189+ objectName: "emergencyCallLabel"
215
190
216 // FIXME: We *should* show emergency dialer if there is a SIM present,
191 // FIXME: We *should* show emergency dialer if there is a SIM present,
217 // regardless of whether the side stage is enabled. But right now,
192 // regardless of whether the side stage is enabled. But right now,
@@ -223,37 +198,20 @@ Showable {
223 visible: !shell.sideStageEnabled
198 visible: !shell.sideStageEnabled
224
199
225 anchors {
200 anchors {
226− left: parent.left
227 bottom: parent.bottom
201 bottom: parent.bottom
228 bottomMargin: units.gu(4)
202 bottomMargin: units.gu(4)
229− right: parent.right
230− }
231− height: childrenRect.height
232− spacing: units.gu(1)
233−
234− Icon {
235− objectName: "emergencyCallIcon"
236− height: units.gu(3)
237− width: height
238− anchors.horizontalCenter: parent.horizontalCenter
203+ horizontalCenter: parent.horizontalCenter
239− name: "phone-app-call-symbolic"
240− color: "#f3f3e7"
241− opacity: 0.6
242 }
204 }
243
205
244− Label {
245− text: i18n.tr("Emergency Call")
206+ text: i18n.tr("Emergency Call")
246− color: "#f3f3e7"
207+ color: "#f3f3e7"
247− opacity: 0.6
208+ opacity: 0.6
248− fontSize: "medium"
249− anchors.horizontalCenter: parent.horizontalCenter
250− }
251 }
209 }
252
210
253 MouseArea {
211 MouseArea {
254− anchors.fill: emergencyCallColumn
212+ anchors.fill: emergencyCallLabel
255 onClicked: root.emergencyCall()
213 onClicked: root.emergencyCall()
256− enabled: emergencyCallColumn.visible
214+ enabled: emergencyCallLabel.visible
257 }
215 }
258
216
259 Component {
217 Component {
qml/Components/PassphraseLockscreen.qml+3−3
@@ -22,7 +22,7 @@ Item {
22 id: root
22 id: root
23 height: highlightItem.height
23 height: highlightItem.height
24
24
25− property string placeholderText
25+ property string infoText
26 property string username: ""
26 property string username: ""
27 property bool entryEnabled: true
27 property bool entryEnabled: true
28
28
@@ -75,8 +75,8 @@ Item {
75 echoMode: TextInput.Password
75 echoMode: TextInput.Password
76 opacity: 0.9
76 opacity: 0.9
77 hasClearButton: false
77 hasClearButton: false
78− enabled: entryEnabled
78+ enabled: root.entryEnabled
79− placeholderText: root.placeholderText
79+ placeholderText: root.infoText
80
80
81 onAccepted: {
81 onAccepted: {
82 if (pinentryField.text) {
82 if (pinentryField.text) {
qml/Components/PinLockscreen.qml+151−163
@@ -22,9 +22,11 @@ import "../Components"
22Column {
22Column {
23 id: root
23 id: root
24 anchors.centerIn: parent
24 anchors.centerIn: parent
25− spacing: units.gu(3.5)
25+ spacing: units.gu(2)
26
26
27− property alias placeholderText: pinentryField.placeholderText
27+ property string infoText
28+ property string retryText
29+ property string errorText
28 property int padWidth: units.gu(34)
30 property int padWidth: units.gu(34)
29 property int padHeight: units.gu(28)
31 property int padHeight: units.gu(28)
30 property int minPinLength: -1
32 property int minPinLength: -1
@@ -35,199 +37,185 @@ Column {
35
37
36 property bool entryEnabled: true
38 property bool entryEnabled: true
37
39
38− function clear(playAnimation) {
40+ function clear(showAnimation) {
39 pinentryField.text = "";
41 pinentryField.text = "";
40− if (playAnimation) {
42+ if (showAnimation) {
43+ pinentryField.incorrectOverride = true;
41 wrongPasswordAnimation.start();
44 wrongPasswordAnimation.start();
42 }
45 }
43 }
46 }
44
47
45− QtObject {
48+ Column {
46− id: priv
49+ id: shakeContainer
47− property bool autoConfirm: root.minPinLength == root.maxPinLength && root.minPinLength != -1
48− }
49−
50− UbuntuShape {
51− id: pinentryField
52− objectName: "pinentryField"
53 anchors.horizontalCenter: parent.horizontalCenter
50 anchors.horizontalCenter: parent.horizontalCenter
54− color: "#55000000"
51+ width: parent.width
55− width:root.padWidth
56− height: units.gu(5)
52+ spacing: units.gu(2)
57− radius: "medium"
58− property string text: ""
59− property string placeholderText: ""
60−
61− function appendChar(character) {
62− if (root.maxPinLength == -1 || pinentryField.text.length < root.maxPinLength) {
63− pinentryField.text = pinentryField.text + character;
64− }
65− }
66−
67− onTextChanged: {
68− pinentryFieldLabel.text = "";
69− for (var i = 0; i < text.length; ++i) {
70− pinentryFieldLabel.text += "•";
71− }
72− if (priv.autoConfirm && text.length === root.maxPinLength) {
73− root.entered(text);
74− }
75− }
76
53
77 Label {
54 Label {
78− id: pinentryFieldLabel
55+ id: infoField
79− anchors.centerIn: parent
56+ objectName: "infoTextLabel"
80− width: parent.width - (backspaceIcon.width + backspaceIcon.anchors.rightMargin) * 2
57+ fontSize: "large"
81− elide: Text.ElideMiddle
82− horizontalAlignment: Text.AlignHCenter
83− font.pixelSize: units.dp(44)
84 color: "#f3f3e7"
58 color: "#f3f3e7"
85− opacity: 0.6
59+ anchors.horizontalCenter: parent.horizontalCenter
86− }
60+ text: root.infoText
87− Label {
88− id: pinentryFieldPlaceHolder
89− objectName: "pinentryFieldPlaceHolder"
90− anchors.centerIn: parent
91− horizontalAlignment: Text.AlignHCenter
92− color: "#f3f3e7"
93− opacity: 0.6
94− text: parent.placeholderText
95− visible: pinentryFieldLabel.text.length == 0
96 }
61 }
97
62
98− Icon {
63+ Item {
99− id: backspaceIcon
64+ id: pinContainer
65+ anchors { left: parent.left; right: parent.right; margins: units.gu(2) }
66+ height: units.gu(4)
67+
68+ Row {
69+ id: pinentryField
100− objectName: "backspaceIcon"
70+ objectName: "pinentryField"
101− anchors {
71+ anchors.horizontalCenter: parent.horizontalCenter
102− top: parent.top
72+ anchors.verticalCenter: parent.verticalCenter
103− topMargin: units.gu(1)
73+ spacing: Math.max(0, Math.min(units.gu(3), (parent.width / root.maxPinLength) - units.gu(3)))
104− right: parent.right
74+
105− rightMargin: units.gu(2)
75+ property string text
106− bottom: parent.bottom
76+ property bool incorrectOverride: false
107− bottomMargin: units.gu(1)
77+
108− }
78+ Repeater {
109− visible: entryEnabled && !priv.autoConfirm
79+ model: pinentryField.text.length
110− width: height
80+ delegate: Rectangle {
111− name: "erase"
112− color: "#f3f3e7"
81+ color: "#f3f3e7"
113− opacity: 0.6
82+ width: Math.min(units.gu(2), (pinContainer.width - pinContainer.height*2 ) / (root.maxPinLength >= 0 ? root.maxPinLength : 16))
114− MouseArea {
83+ height: width
115− anchors.fill: parent
84+ radius: width / 2
116− onClicked: pinentryField.text = pinentryField.text.substring(0, pinentryField.text.length-1);
117− }
118− }
85+ }
119− }
86+ }
120
87
121− UbuntuShape {
88+ function appendNumber(number) {
122− anchors {
89+ if (incorrectOverride) {
123− left: parent.left
90+ incorrectOverride = false;
124− right: parent.right
125− margins: (parent.width - root.padWidth) / 2
126− }
127− height: root.padHeight
128− color: "#55000000"
129− radius: "medium"
130−
131− ThinDivider {
132− anchors {
133− left: parent.left
134− right: parent.right
135− top: parent.top
136− topMargin: root.padHeight / 4
137− }
138− }
139− ThinDivider {
140− anchors {
141− left: parent.left
142− right: parent.right
143− verticalCenter: parent.verticalCenter
144− }
145− }
146− ThinDivider {
147− anchors {
148− left: parent.left
149− right: parent.right
150− bottom: parent.bottom
151− bottomMargin: root.padHeight / 4
152− }
153− }
91+ }
154
92
155− ThinDivider {
93+ pinentryField.text = pinentryField.text + number
156− anchors.centerIn: parent
94+
157− anchors.horizontalCenterOffset: -root.padWidth / 6
95+ if (root.minPinLength > 0 && root.maxPinLength > 0
158− width: root.padHeight
96+ && root.minPinLength == root.maxPinLength && pinentryField.text.length == root.minPinLength) {
159− rotation: -90
97+ root.entered(pinentryField.text)
160− }
98+ }
161− ThinDivider {
162− anchors.centerIn: parent
163− anchors.horizontalCenterOffset: root.padWidth / 6
164− width: root.padHeight
165− rotation: -90
166− }
99+ }
167
100
168− Grid {
101+ function backspace() {
169− anchors {
102+ pinentryField.text = pinentryField.text.substring(0, pinentryField.text.length-1)
170− left: parent.left
103+ }
171− right: parent.right
104+ }
172− margins: (parent.width - root.padWidth) / 2
105+ Label {
106+ id: wrongNoticeLabel
107+ objectName: "wrongNoticeLabel"
108+ fontSize: "x-large"
109+ color: "#f3f3e7"
110+ anchors.horizontalCenter: parent.horizontalCenter
111+ text: root.errorText
112+ visible: pinentryField.incorrectOverride
173 }
113 }
174
114
175− columns: 3
115+ AbstractButton {
116+ objectName: "backspaceIcon"
117+ anchors { right: parent.right; top: parent.top; bottom: parent.bottom }
118+ width: height
176
119
177− Repeater {
120+ Icon {
178− model: 9
121+ anchors.fill: parent
122+ name: "erase"
123+ color: "#f3f3e7"
124+ }
179
125
180− PinPadButton {
126+ opacity: (pinentryField.text.length && !pinentryField.incorrectOverride) > 0 ? 1 : 0
181− objectName: "pinPadButton" + (index + 1)
182− width: root.padWidth / 3
183− height: root.padHeight / 4
184− text: index + 1
185− enabled: entryEnabled
186
127
187− onClicked: {
128+ Behavior on opacity {
188− pinentryField.appendChar(text);
129+ UbuntuNumberAnimation {}
189− }
190 }
130 }
191− }
192
131
193− PinPadButton {
132+ onClicked: pinentryField.backspace()
194− objectName: "pinPadButtonBack"
195− width: root.padWidth / 3
196− height: root.padHeight / 4
197− subText: i18n.tr("CANCEL")
198− onClicked: root.cancel();
199 }
133 }
134+ }
200
135
201− PinPadButton {
136+ Label {
202− objectName: "pinPadButton0"
137+ objectName: "retryLabel"
203− width: root.padWidth / 3
138+ fontSize: "x-small"
204− height: root.padHeight / 4
139+ color: "#f3f3e7"
205− text: "0"
140+ anchors.horizontalCenter: parent.horizontalCenter
206− onClicked: pinentryField.appendChar(text);
141+ text: root.retryText || " "
207− enabled: entryEnabled
142+ }
208− }
143+ }
144+
145+ ThinDivider {
146+ anchors { left: parent.left; right: parent.right; margins: units.gu(2) }
147+ }
148+
149+ Grid {
150+ id: numbersGrid
151+ anchors { horizontalCenter: parent.horizontalCenter }
152+ columns: 3
153+
154+ property int buttonHeight: units.gu(8)
155+ property int buttonWidth: units.gu(12)
156+
157+ Repeater {
158+ model: 9
209
159
210 PinPadButton {
160 PinPadButton {
211− objectName: "pinPadButtonErase"
161+ objectName: "pinPadButton" + text
212− width: root.padWidth / 3
162+ text: index + 1
213− height: root.padHeight / 4
163+ height: numbersGrid.buttonHeight
214− iconName: priv.autoConfirm ? "erase" : ""
164+ width: numbersGrid.buttonWidth
215− subText: priv.autoConfirm ? "" : i18n.tr("DONE")
165+ enabled: root.entryEnabled && (root.maxPinLength == -1 ||
166+ pinentryField.text.length < root.maxPinLength ||
167+ pinentryField.incorrectOverride)
168+
216 onClicked: {
169 onClicked: {
217− if (priv.autoConfirm) {
170+ pinentryField.appendNumber(index + 1)
218− pinentryField.text = pinentryField.text.substring(0, pinentryField.text.length-1);
219− } else {
220− root.entered(pinentryField.text);
221− }
222 }
171 }
223− enabled: priv.autoConfirm ? entryEnabled : pinentryField.text.length >= root.minPinLength
224 }
172 }
225 }
173 }
174+ Item {
175+ height: numbersGrid.buttonHeight
176+ width: numbersGrid.buttonWidth
226− }
177+ }
178+ PinPadButton {
179+ text: "0"
180+ height: numbersGrid.buttonHeight
181+ width: numbersGrid.buttonWidth
182+ enabled: root.entryEnabled && (root.maxPinLength == -1 ||
183+ pinentryField.text.length < root.maxPinLength ||
184+ pinentryField.incorrectOverride)
185+
186+ onClicked: {
187+ pinentryField.appendNumber(0)
188+ }
189+ }
190+ Item {
191+ height: numbersGrid.buttonHeight
192+ width: numbersGrid.buttonWidth
193+ }
194+ PinPadButton {
195+ iconName: "close"
196+ height: numbersGrid.buttonHeight
197+ width: numbersGrid.buttonWidth
227
198
199+ onClicked: root.cancel()
200+ }
201+ Item {
202+ height: numbersGrid.buttonHeight
203+ width: numbersGrid.buttonWidth
204+ }
205+ PinPadButton {
206+ iconName: "tick"
207+ objectName: "confirmButton"
208+ height: numbersGrid.buttonHeight
209+ width: numbersGrid.buttonWidth
210+ enabled: root.enabled && pinentryField.text.length >= root.minPinLength
211+ visible: root.minPinLength == -1 || root.minPinLength !== root.maxPinLength
212+
213+ onClicked: root.entered(pinentryField.text)
214+ }
215+ }
228 WrongPasswordAnimation {
216 WrongPasswordAnimation {
229 id: wrongPasswordAnimation
217 id: wrongPasswordAnimation
230 objectName: "wrongPasswordAnimation"
218 objectName: "wrongPasswordAnimation"
231− target: pinentryField
219+ target: shakeContainer
232 }
220 }
233}
221}
qml/Components/PinPadButton.qml+31−45
@@ -15,62 +15,48 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.1
19
19
20−Item {
20+AbstractButton {
21 id: root
21 id: root
22 opacity: enabled ? 1 : 0.6
22 opacity: enabled ? 1 : 0.6
23
23
24 property alias text: label.text
24 property alias text: label.text
25− property alias subText: subTextLabel.text
26 property string iconName
25 property string iconName
27
26
28− signal clicked()
27+ UbuntuShape {
28+ anchors.fill: parent
29+ opacity: root.pressed ? 1 : 0
30+ Behavior on opacity {
31+ UbuntuNumberAnimation {}
32+ }
33+ }
29
34
30− Column {
35+ Label {
36+ id: label
31 anchors.centerIn: parent
37 anchors.centerIn: parent
32− width: parent.width
33− height: childrenRect.height
34−
35− Item {
36− anchors {
37− left: parent.left
38− right: parent.right
39− }
40− height: label.visible || icon.visible ? Math.max(label.height, icon.height) : 0
41−
42− Label {
43− id: label
44− anchors.centerIn: parent
45− width: parent.width
46− horizontalAlignment: Text.AlignHCenter
38+ horizontalAlignment: Text.AlignHCenter
47− color: "#f3f3e7"
39+ color: "#f3f3e7"
48− fontSize: "large"
40+ fontSize: "x-large"
49− font.weight: Font.DemiBold
41+ font.weight: Font.DemiBold
50− visible: text.length > 0
42+ visible: text.length > 0
51− }
43+ scale: root.pressed ? 0.9 : 1
52−
44+ Behavior on scale {
53− Icon {
45+ UbuntuNumberAnimation {}
54− id: icon
55− height: units.gu(3)
56− width: height
57− anchors.centerIn: parent
58− name: root.iconName
59− color: "#f3f3e7"
60− visible: name.length > 0
61− }
62− }
63− Label {
64− id: subTextLabel
65− fontSize: "small"
66− color: "#f3f3e7"
67− anchors.horizontalCenter: parent.horizontalCenter
68− visible: text.length > 0
69 }
46 }
70 }
47 }
71
48
72− MouseArea {
49+ Icon {
50+ id: icon
51+ height: units.gu(3)
52+ width: height
73− anchors.fill: parent
53+ anchors.centerIn: parent
74− onClicked: root.clicked()
54+ name: root.iconName
55+ color: "#f3f3e7"
56+ visible: name.length > 0
57+ scale: root.pressed ? 0.9 : 1
58+ Behavior on scale {
59+ UbuntuNumberAnimation { duration: UbuntuAnimation.SlowDuration }
60+ }
75 }
61 }
76}
62}
qml/Notifications/NotificationMenuItemFactory.qml+4−1
@@ -117,7 +117,10 @@ Loader {
117 right: parent.right
117 right: parent.right
118 }
118 }
119 height: menuFactory.maxHeight
119 height: menuFactory.maxHeight
120− placeholderText: i18n.tr("Please enter SIM PIN")
120+ infoText: i18n.tr("Enter SIM PIN")
121+ errorText: i18n.tr("Sorry, incorrect PIN")
122+ minPinLength: 4
123+ maxPinLength: 8
121 background: shell.background
124 background: shell.background
122
125
123 onEntered: {
126 onEntered: {
qml/Shell.qml+11−7
@@ -274,15 +274,19 @@ Item {
274
274
275 onShowPrompt: {
275 onShowPrompt: {
276 if (greeter.narrowMode) {
276 if (greeter.narrowMode) {
277− var promptText = text.toLowerCase()
278 if (isDefaultPrompt) {
277 if (isDefaultPrompt) {
279− promptText = lockscreen.alphaNumeric ?
278+ if (lockscreen.alphaNumeric) {
280− i18n.tr("passphrase") : i18n.tr("passcode")
279+ lockscreen.infoText = i18n.tr("Enter your passphrase")
280+ lockscreen.errorText = i18n.tr("Sorry, incorrect passphrase")
281+ } else {
282+ lockscreen.infoText = i18n.tr("Enter your PIN")
283+ lockscreen.errorText = i18n.tr("Sorry, incorrect PIN")
284+ }
285+ } else {
286+ lockscreen.infoText = i18n.tr("Enter your %1").arg(text.toLowerCase())
287+ lockscreen.errorText = i18n.tr("Sorry, incorrect %1").arg(text.toLowerCase())
281 }
288 }
282− lockscreen.placeholderText = i18n.tr("Enter your %1").arg(promptText)
289+
283− lockscreen.wrongPlaceholderText = i18n.tr("Incorrect %1").arg(promptText) +
284− "\n" +
285− i18n.tr("Please re-enter")
286 lockscreen.show();
290 lockscreen.show();
287 }
291 }
288 }
292 }
tests/autopilot/unity8/shell/tests/test_lock_screen.py+2−2
@@ -54,7 +54,7 @@ class TestLockscreen(UnityTestCase):
54 self.main_window.enter_pin_code("1234")
54 self.main_window.enter_pin_code("1234")
55 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
55 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
56 else:
56 else:
57− self._enter_prompt_passphrase("1234")
57+ self._enter_prompt_passphrase("1234\n")
58 self.assertThat(greeter.shown, Eventually(Equals(False)))
58 self.assertThat(greeter.shown, Eventually(Equals(False)))
59
59
60 @with_lightdm_mock("single-passphrase")
60 @with_lightdm_mock("single-passphrase")
@@ -86,7 +86,7 @@ class TestLockscreen(UnityTestCase):
86 self.assertThat(pinentryField.text, Eventually(Equals("")))
86 self.assertThat(pinentryField.text, Eventually(Equals("")))
87 self.assertThat(lockscreen.shown, Eventually(Equals(True)))
87 self.assertThat(lockscreen.shown, Eventually(Equals(True)))
88 else:
88 else:
89− self._enter_prompt_passphrase("4231")
89+ self._enter_prompt_passphrase("4231\n")
90 prompt = self.main_window.get_greeter().get_prompt()
90 prompt = self.main_window.get_greeter().get_prompt()
91 self.assertThat(prompt.text, Eventually(Equals("")))
91 self.assertThat(prompt.text, Eventually(Equals("")))
92 self.assertThat(greeter.shown, Eventually(Equals(True)))
92 self.assertThat(greeter.shown, Eventually(Equals(True)))
tests/qmltests/Greeter/tst_Lockscreen.qml+65−46
@@ -26,22 +26,21 @@ import Unity.Test 0.1 as UT
26Rectangle {
26Rectangle {
27 id: root
27 id: root
28 width: units.gu(80)
28 width: units.gu(80)
29− height: units.gu(80)
29+ height: units.gu(70)
30 color: "orange"
30 color: "orange"
31
31
32 Lockscreen {
32 Lockscreen {
33 id: lockscreen
33 id: lockscreen
34 anchors.fill: parent
34 anchors.fill: parent
35− anchors.rightMargin: units.gu(30)
35+ anchors.rightMargin: units.gu(40)
36− placeholderText: "Please enter your PIN"
36+ infoText: infoTextTextField.text
37− wrongPlaceholderText: "Incorrect PIN"
38 retryText: retryCountTextField.text
37 retryText: retryCountTextField.text
38+ errorText: errorTextTextField.text
39 alphaNumeric: pinPadCheckBox.checked
39 alphaNumeric: pinPadCheckBox.checked
40 minPinLength: minPinLengthTextField.text
40 minPinLength: minPinLengthTextField.text
41 maxPinLength: maxPinLengthTextField.text
41 maxPinLength: maxPinLengthTextField.text
42 username: "Lola"
42 username: "Lola"
43 background: "../../../qml/graphics/phone_background.jpg"
43 background: "../../../qml/graphics/phone_background.jpg"
44− infoText: infoTextTextField.text
45 }
44 }
46
45
47 Connections {
46 Connections {
@@ -68,7 +67,7 @@ Rectangle {
68 } else {
67 } else {
69 pinPadCheckBox.checked = true
68 pinPadCheckBox.checked = true
70 }
69 }
71− lockscreen.placeholderText = text;
70+ lockscreen.infoText = text;
72 }
71 }
73 }
72 }
74
73
@@ -157,7 +156,14 @@ Rectangle {
157 id: infoTextTextField
156 id: infoTextTextField
158 width: parent.width
157 width: parent.width
159 placeholderText: "Infotext"
158 placeholderText: "Infotext"
160− text: "+49 179 3253553"
159+ text: "Enter SIM1 PIN"
160+ }
161+
162+ TextField {
163+ id: errorTextTextField
164+ width: parent.width
165+ placeholderText: "Error text"
166+ text: "Sorry, incorrect PIN"
161 }
167 }
162
168
163 TextField {
169 TextField {
@@ -223,7 +229,7 @@ Rectangle {
223 emergencyCheckBox.checked = false
229 emergencyCheckBox.checked = false
224 pinPadCheckBox.checked = data.alphanumeric
230 pinPadCheckBox.checked = data.alphanumeric
225 waitForLockscreenReady();
231 waitForLockscreenReady();
226− var emergencyButton = findChild(lockscreen, "emergencyCallIcon")
232+ var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
227 mouseClick(emergencyButton, units.gu(1), units.gu(1))
233 mouseClick(emergencyButton, units.gu(1), units.gu(1))
228 tryCompare(emergencyCheckBox, "checked", true)
234 tryCompare(emergencyCheckBox, "checked", true)
229
235
@@ -231,18 +237,20 @@ Rectangle {
231
237
232 function test_labels_data() {
238 function test_labels_data() {
233 return [
239 return [
234− {tag: "numeric", alphanumeric: false, placeholderText: "Please enter your PIN", username: "foobar" },
240+ {tag: "numeric", alphanumeric: false, infoText: "Please enter your PIN", username: "foobar" },
235− {tag: "alphanumeric", alphanumeric: true, placeholderText: "Please enter your password", username: "Lola" }
241+ {tag: "alphanumeric", alphanumeric: true, infoText: "Please enter your password", username: "Lola" }
236 ]
242 ]
237 }
243 }
238
244
239 function test_labels(data) {
245 function test_labels(data) {
240 pinPadCheckBox.checked = data.alphanumeric
246 pinPadCheckBox.checked = data.alphanumeric
241− lockscreen.placeholderText = data.placeholderText
247+ lockscreen.infoText = data.infoText
242 waitForLockscreenReady();
248 waitForLockscreenReady();
243− compare(findChild(lockscreen, "pinentryField").placeholderText, data.placeholderText, "Placeholdertext is not what it should be")
244 if (data.alphanumeric) {
249 if (data.alphanumeric) {
250+ compare(findChild(lockscreen, "pinentryField").placeholderText, data.infoText, "Placeholdertext is not what it should be")
245 compare(findChild(lockscreen, "greeterLabel").text, "Hello " + data.username, "Greeter is not set correctly")
251 compare(findChild(lockscreen, "greeterLabel").text, "Hello " + data.username, "Greeter is not set correctly")
252+ } else {
253+ compare(findChild(lockscreen, "infoTextLabel").text, data.infoText, "Placeholdertext is not what it should be")
246 }
254 }
247 }
255 }
248
256
@@ -276,10 +284,8 @@ Rectangle {
276 var button = findChild(lockscreen, "pinPadButton" + character)
284 var button = findChild(lockscreen, "pinPadButton" + character)
277 mouseClick(button, units.gu(1), units.gu(1))
285 mouseClick(button, units.gu(1), units.gu(1))
278 }
286 }
279− if (data.minPinLength !== data.maxPinLength || data.minPinLength == -1) {
280− var pinPadButtonErase = findChild(lockscreen, "pinPadButtonErase");
287+ var confirmButton = findChild(lockscreen, "confirmButton");
281− mouseClick(pinPadButtonErase, units.gu(1), units.gu(1));
288+ mouseClick(confirmButton, units.gu(1), units.gu(1));
282− }
283 }
289 }
284 tryCompare(enteredLabel, "text", data.password)
290 tryCompare(enteredLabel, "text", data.password)
285 }
291 }
@@ -317,11 +323,9 @@ Rectangle {
317 wait(0) // Trigger event loop to make sure the animation would start running
323 wait(0) // Trigger event loop to make sure the animation would start running
318 compare(animation.running, data.animation)
324 compare(animation.running, data.animation)
319 if (data.animation) {
325 if (data.animation) {
320− if (data.alphanumeric) {
326+ if (!data.alphanumeric) {
321− tryCompare(inputField, "placeholderText", lockscreen.wrongPlaceholderText)
322− } else {
323− var label = findChild(lockscreen, "pinentryFieldPlaceHolder");
327+ var label = findChild(lockscreen, "wrongNoticeLabel");
324− tryCompare(label, "text", lockscreen.wrongPlaceholderText)
328+ tryCompare(label, "visible", true)
325 }
329 }
326 }
330 }
327
331
@@ -343,24 +347,21 @@ Rectangle {
343 maxPinLengthTextField.text = data.maxPinLength
347 maxPinLengthTextField.text = data.maxPinLength
344 waitForLockscreenReady();
348 waitForLockscreenReady();
345
349
346− var pinPadButtonErase = findChild(lockscreen, "pinPadButtonErase");
347 var backspaceIcon = findChild(lockscreen, "backspaceIcon");
350 var backspaceIcon = findChild(lockscreen, "backspaceIcon");
348 var pinEntryField = findChild(lockscreen, "pinentryField");
351 var pinEntryField = findChild(lockscreen, "pinentryField");
349
352
350− var autoConfirmEnabled = data.minPinLength === data.maxPinLength && data.minPinLength !== -1;
351− compare(pinPadButtonErase.iconName, autoConfirmEnabled ? "erase" : "");
352− compare(backspaceIcon.visible, !autoConfirmEnabled);
353+ compare(backspaceIcon.opacity, 0);
353
354
354 var pinPadButton5 = findChild(lockscreen, "pinPadButton5");
355 var pinPadButton5 = findChild(lockscreen, "pinPadButton5");
355 mouseClick(pinPadButton5, units.gu(1), units.gu(1));
356 mouseClick(pinPadButton5, units.gu(1), units.gu(1));
356 compare(pinEntryField.text, "5");
357 compare(pinEntryField.text, "5");
357
358
358− if (data.minPinLength !== data.maxPinLength) {
359− mouseClick(backspaceIcon, units.gu(1), units.gu(1));
359+ tryCompare(backspaceIcon, "opacity", 1);
360− } else {
360+
361− mouseClick(pinPadButtonErase, units.gu(1), units.gu(1));
361+ mouseClick(backspaceIcon, units.gu(1), units.gu(1));
362− }
363 compare(pinEntryField.text, "");
362 compare(pinEntryField.text, "");
363+
364+ tryCompare(backspaceIcon, "opacity", 0);
364 }
365 }
365
366
366 function test_minMaxLength_data() {
367 function test_minMaxLength_data() {
@@ -373,37 +374,55 @@ Rectangle {
373
374
374 function test_minMaxLength(data) {
375 function test_minMaxLength(data) {
375 pinPadCheckBox.checked = false
376 pinPadCheckBox.checked = false
376− minPinLengthTextField.text = data.minPinLength
377+ minPinLengthTextField.text = data.minPinLength;
377− maxPinLengthTextField.text = data.maxPinLength
378+ maxPinLengthTextField.text = data.maxPinLength;
378 waitForLockscreenReady();
379 waitForLockscreenReady();
379
380
380 var pinPadButton5 = findChild(lockscreen, "pinPadButton5");
381 var pinPadButton5 = findChild(lockscreen, "pinPadButton5");
381− var pinPadButtonErase = findChild(lockscreen, "pinPadButtonErase");
382+ var backspaceButton = findChild(lockscreen, "backspaceIcon");
383+ var confirmButton = findChild(lockscreen, "confirmButton");
382− var inputField = findChild(lockscreen, "pinentryField")
384+ var inputField = findChild(lockscreen, "pinentryField");
385+
386+ tryCompare(backspaceButton, "opacity", 0);
387+
388+ tryCompare(confirmButton, "visible", (data.minPinLength != data.maxPinLength) || (data.minPinLength == -1));
383
389
384 for (var i = 0; i < 10; i++) {
390 for (var i = 0; i < 10; i++) {
385 mouseClick(pinPadButton5, units.gu(1), units.gu(1));
391 mouseClick(pinPadButton5, units.gu(1), units.gu(1));
392+ tryCompare(backspaceButton, "opacity", 1)
386
393
387− if (data.minPinLength == data.maxPinLength && data.minPinLength != -1) {
394+ if (data.maxPinLength == data.minPinLength && data.minPinLength > 0) {
388− // auto confirm mode...
395+ // Autoconfirm mode. This will automatically confirm (and with it reset)
396+ // the textfield every data.minPinLength presses
397+ if (i+1 < data.minPinLength) {
389− compare(inputField.text.length, (i+1) % data.minPinLength);
398+ compare(inputField.text.length, i + 1);
399+ } else {
400+ compare(inputField.text.length, (i+1) % data.minPinLength)
401+ }
390 } else {
402 } else {
391− // manual confirm mode
392− tryCompare(pinPadButtonErase, "enabled", (i+1) >= data.minPinLength)
393 if (data.maxPinLength == -1) {
403 if (data.maxPinLength == -1) {
404+ // Undefined maxLength... make sure all presses are recorded
394 compare(inputField.text.length, i+1);
405 compare(inputField.text.length, i+1);
395 } else {
406 } else {
407+ // We have a max length. Make sure we're only accepting maxLength presses
396 compare(inputField.text.length, Math.min(data.maxPinLength, i+1));
408 compare(inputField.text.length, Math.min(data.maxPinLength, i+1));
397 }
409 }
398
410
411+ if (data.minPinLength == -1) {
412+ // Undefined minLength. Make sure confirm button is always enabled
413+ compare(confirmButton.enabled, true);
414+ } else {
415+ // We have a min length. Make sure the confirm button is only enabled when met.
416+ compare(confirmButton.enabled, (i+1) >= data.minPinLength);
417+ }
399 }
418 }
400 }
419 }
401 }
420 }
402
421
403 function test_retryDisplay_data() {
422 function test_retryDisplay_data() {
404 return [
423 return [
405− {tag: "empty", retryText: "", shown: false},
424+ {tag: "empty", retryText: " "},
406− {tag: "3 retries left", retryText: "3 retries left", shown: true},
425+ {tag: "3 retries left", retryText: "3 retries left"},
407 ]
426 ]
408 }
427 }
409
428
@@ -412,8 +431,8 @@ Rectangle {
412 waitForLockscreenReady();
431 waitForLockscreenReady();
413
432
414 retryCountTextField.text = data.retryText;
433 retryCountTextField.text = data.retryText;
415− var label = findChild(lockscreen, "retryCountLabel")
434+ var label = findChild(lockscreen, "retryLabel")
416− compare(label.visible, data.shown);
435+ compare(label.text, data.retryText);
417 }
436 }
418
437
419 function test_infoPopup() {
438 function test_infoPopup() {
@@ -438,8 +457,8 @@ Rectangle {
438
457
439 function test_infoTextDisplay_data() {
458 function test_infoTextDisplay_data() {
440 return [
459 return [
441− {tag: "empty string", text: "", shown: false},
460+ {tag: "empty string", text: ""},
442− {tag: "hello world", text: "hello world", shown: true},
461+ {tag: "hello world", text: "hello world"},
443 ]
462 ]
444 }
463 }
445
464
@@ -449,7 +468,7 @@ Rectangle {
449
468
450 infoTextTextField.text = data.text;
469 infoTextTextField.text = data.text;
451 var label = findChild(lockscreen, "infoTextLabel")
470 var label = findChild(lockscreen, "infoTextLabel")
452− compare(label.visible, data.shown);
471+ compare(label.text, data.text);
453 }
472 }
454 }
473 }
455
474
tests/qmltests/tst_ShellWithPin.qml+26−11
@@ -15,6 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18+import Ubuntu.Components 1.0
18import QtTest 1.0
19import QtTest 1.0
19import AccountsService 0.1
20import AccountsService 0.1
20import GSettings 1.0
21import GSettings 1.0
@@ -28,7 +29,7 @@ import "../../qml"
28
29
29Item {
30Item {
30 id: root
31 id: root
31− width: shell.width
32+ width: shell.width + units.gu(20)
32 height: shell.height
33 height: shell.height
33
34
34 QtObject {
35 QtObject {
@@ -49,6 +50,20 @@ Item {
49
50
50 Shell {
51 Shell {
51 id: shell
52 id: shell
53+ maxFailedLogins: maxRetriesTextField.text
54+ }
55+ Column {
56+ anchors { top: parent.top; right: parent.right; bottom: parent.bottom; margins:units.gu(1) }
57+ width: units.gu(18)
58+
59+ Label {
60+ text: "Max retries:"
61+ color: "black"
62+ }
63+ TextField {
64+ id: maxRetriesTextField
65+ text: "-1"
66+ }
52 }
67 }
53
68
54 SignalSpy {
69 SignalSpy {
@@ -74,7 +89,7 @@ Item {
74 function init() {
89 function init() {
75 swipeAwayGreeter()
90 swipeAwayGreeter()
76 shell.failedLoginsDelayAttempts = -1
91 shell.failedLoginsDelayAttempts = -1
77− shell.maxFailedLogins = -1
92+ maxRetriesTextField.text = "-1"
78 }
93 }
79
94
80 function cleanup() {
95 function cleanup() {
@@ -139,7 +154,7 @@ Item {
139 function test_emergencyCall() {
154 function test_emergencyCall() {
140 var greeter = findChild(shell, "greeter")
155 var greeter = findChild(shell, "greeter")
141 var lockscreen = findChild(shell, "lockscreen")
156 var lockscreen = findChild(shell, "lockscreen")
142− var emergencyButton = findChild(lockscreen, "emergencyCallIcon")
157+ var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
143 var panel = findChild(shell, "panel")
158 var panel = findChild(shell, "panel")
144 var indicators = findChild(shell, "indicators")
159 var indicators = findChild(shell, "indicators")
145 var launcher = findChild(shell, "launcher")
160 var launcher = findChild(shell, "launcher")
@@ -170,7 +185,7 @@ Item {
170
185
171 function test_emergencyCallCrash() {
186 function test_emergencyCallCrash() {
172 var lockscreen = findChild(shell, "lockscreen")
187 var lockscreen = findChild(shell, "lockscreen")
173− var emergencyButton = findChild(lockscreen, "emergencyCallIcon")
188+ var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
174 mouseClick(emergencyButton, units.gu(1), units.gu(1))
189 mouseClick(emergencyButton, units.gu(1), units.gu(1))
175
190
176 tryCompare(lockscreen, "shown", false)
191 tryCompare(lockscreen, "shown", false)
@@ -180,7 +195,7 @@ Item {
180
195
181 function test_emergencyCallAppLaunch() {
196 function test_emergencyCallAppLaunch() {
182 var lockscreen = findChild(shell, "lockscreen")
197 var lockscreen = findChild(shell, "lockscreen")
183− var emergencyButton = findChild(lockscreen, "emergencyCallIcon")
198+ var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
184 mouseClick(emergencyButton, units.gu(1), units.gu(1))
199 mouseClick(emergencyButton, units.gu(1), units.gu(1))
185
200
186 tryCompare(lockscreen, "shown", false)
201 tryCompare(lockscreen, "shown", false)
@@ -201,21 +216,21 @@ Item {
201 function test_wrongEntries() {
216 function test_wrongEntries() {
202 shell.failedLoginsDelayAttempts = 3
217 shell.failedLoginsDelayAttempts = 3
203
218
204− var placeHolder = findChild(shell, "pinentryFieldPlaceHolder")
219+ var placeHolder = findChild(shell, "wrongNoticeLabel")
205− tryCompare(placeHolder, "text", "Enter your passcode")
220+ tryCompare(placeHolder, "text", "")
206
221
207 enterPin("1111")
222 enterPin("1111")
208− tryCompare(placeHolder, "text", "Incorrect passcode\nPlease re-enter")
223+ tryCompare(placeHolder, "text", "Sorry, incorrect PIN")
209
224
210 enterPin("1111")
225 enterPin("1111")
211− tryCompare(placeHolder, "text", "Incorrect passcode\nPlease re-enter")
226+ tryCompare(placeHolder, "text", "Sorry, incorrect PIN")
212
227
213 enterPin("1111")
228 enterPin("1111")
214− tryCompare(placeHolder, "text", "Too many incorrect attempts\nPlease wait")
229+ tryCompare(placeHolder, "text", "Too many incorrect attempts")
215 }
230 }
216
231
217 function test_factoryReset() {
232 function test_factoryReset() {
218− shell.maxFailedLogins = 3
233+ maxRetriesTextField.text = "3"
219 resetSpy.clear()
234 resetSpy.clear()
220
235
221 enterPin("1111")
236 enterPin("1111")