[gnome-shell/wip/smartcard: 4/16] loginDialog: don't ever call _reset directly



commit c2dee59f7c37734476ca875e481f1e2bd0fdb476
Author: Ray Strode <rstrode redhat com>
Date:   Sun Jul 28 15:55:09 2013 -0400

    loginDialog: don't ever call _reset directly
    
    The only time we ever call _reset directly is when
    detecting changes to disable-user-list.  We can implicitly
    trigger a reset for this case, just as easily by calling
    this._authPrompt.reset()
    
    This commit makes that change for consistency and to make
    it easier to adjust the authprompt workflow later.

 js/gdm/loginDialog.js |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index c0c63aa..1978934 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -451,7 +451,7 @@ const LoginDialog = new Lang.Class({
 
         this._authPrompt = new AuthPrompt.AuthPrompt(gdmClient, AuthPrompt.AuthPromptMode.UNLOCK_OR_LOG_IN);
         this._authPrompt.connect('prompted', Lang.bind(this, this._onPrompted));
-        this._authPrompt.connect('reset', Lang.bind(this, this._reset));
+        this._authPrompt.connect('reset', Lang.bind(this, this._onReset));
         this._authPrompt.hide();
 
         this._authPrompt.actor.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
@@ -535,7 +535,7 @@ const LoginDialog = new Lang.Class({
             this._disableUserList = disableUserList;
 
             if (!this._authPrompt.verifyingUser)
-                this._reset();
+                this._authPrompt.reset();
         }
     },
 
@@ -577,10 +577,7 @@ const LoginDialog = new Lang.Class({
         this._showPrompt();
     },
 
-    _reset: function() {
-        if (this._authPrompt.verifyingUser)
-            return;
-
+    _onReset: function() {
         this._sessionMenuButton.updateSensitivity(true);
 
         this._user = null;


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