@@ -254,14 +254,6 @@ Item {
258− id: factoryResetWarningDialog
259− FactoryResetWarningDialog {
260− objectName: "factoryResetWarningDialog"
261− alphaNumeric: lockscreen.alphaNumeric
265 Connections {
257 Connections {
266 target: LightDM.Greeter
258 target: LightDM.Greeter
@@ -310,7 +302,14 @@ Item {
310 AccountsService.failedLogins++
302 AccountsService.failedLogins++
311 if (maxFailedLogins >= 2) { // require at least a warning
303 if (maxFailedLogins >= 2) { // require at least a warning
312 if (AccountsService.failedLogins === maxFailedLogins - 1) {
304 if (AccountsService.failedLogins === maxFailedLogins - 1) {
313− PopupUtils.open(factoryResetWarningDialog)
305+ var title = lockscreen.alphaNumeric ?
306+ i18n.tr("Sorry, incorrect passphrase.") :
307+ i18n.tr("Sorry, incorrect passcode.")
308+ var text = i18n.tr("This will be your last attempt.") + " " +
309+ (lockscreen.alphaNumeric ?
310+ i18n.tr("If passphrase is entered incorrectly, your phone will conduct a factory reset and all personal data will be deleted.") :
311+ i18n.tr("If passcode is entered incorrectly, your phone will conduct a factory reset and all personal data will be deleted."))
312+ lockscreen.showInfoPopup(title, text)
314 } else if (AccountsService.failedLogins >= maxFailedLogins) {
313 } else if (AccountsService.failedLogins >= maxFailedLogins) {
315 SystemImage.factoryReset() // Ouch!
314 SystemImage.factoryReset() // Ouch!