[gnome-shell/wip/wayland-gdm-cleanup: 14/19] gdm: Emit the 'failed' status immediately, and not on reset



commit 6e27ef8ff9813f5ac8ef1811f995e558a8851f1b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Mar 7 17:42:53 2014 -0500

    gdm: Emit the 'failed' status immediately, and not on reset
    
    There's really no reason to do it this way: it works in both cases,
    and it's a lot simpler to reason about.

 js/gdm/authPrompt.js |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index d028052..4a4f761 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -257,6 +257,8 @@ const AuthPrompt = new Lang.Class({
         this.updateSensitivity(true);
         this.setActorInDefaultButtonWell(null);
         this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
+
+        this.emit('failed');
     },
 
     _onVerificationComplete: function() {
@@ -428,21 +430,17 @@ const AuthPrompt = new Lang.Class({
     },
 
     reset: function() {
-        let oldStatus = this.verificationStatus;
-        this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
-
-        if (oldStatus == AuthPromptStatus.VERIFYING)
+        if (this.verificationStatus == AuthPromptStatus.VERIFYING)
             this._userVerifier.cancel();
 
+        this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
+
         this._queryingService = null;
         this.clear();
         this._message.opacity = 0;
         this.setUser(null);
         this.stopSpinning();
 
-        if (oldStatus == AuthPromptStatus.VERIFICATION_FAILED)
-            this.emit('failed');
-
         let beginRequestType;
 
         if (this._mode == AuthPromptMode.UNLOCK_ONLY) {


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