[gnome-shell] UnlockDialog: reset UI on verification failure



commit 99f97adfc6815c9c0e831994dcbc63a5051af7fe
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Wed Oct 3 23:15:41 2012 +0200

    UnlockDialog: reset UI on verification failure
    
    When failing verification, reset the UI to the default pre-password
    request state, waiting for the next prompt.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685441

 js/ui/unlockDialog.js |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 5ee4387..7b30182 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -128,6 +128,7 @@ const UnlockDialog = new Lang.Class({
         this._userVerifier.connect('ask-question', Lang.bind(this, this._onAskQuestion));
         this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage));
         this._userVerifier.connect('verification-complete', Lang.bind(this, this._onVerificationComplete));
+        this._userVerifier.connect('verification-failed', Lang.bind(this, this._onVerificationFailed));
         this._userVerifier.connect('reset', Lang.bind(this, this._onReset));
 
         this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint));
@@ -274,6 +275,16 @@ const UnlockDialog = new Lang.Class({
         this.emit('failed');
     },
 
+    _onVerificationFailed: function() {
+        this._currentQuery = null;
+        this._firstQuestion = true;
+
+        this._promptEntry.clutter_text.set_password_char('\u25cf');
+        this._promptEntry.menu.isPassword = true;
+
+        this._updateSensitivity(false);
+    },
+
     _escape: function() {
         this._userVerifier.cancel();
         this.emit('failed');



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]