[gnome-shell/uajain/adapt-user-avatar-part2: 18/20] authPrompt: Only spin on password entries



commit e37b323d0f77df3aa8c67694e1e386da655188d3
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Feb 11 10:33:02 2020 -0300

    authPrompt: Only spin on password entries
    
    Spinning while typing the password is a bit off-putting, and
    inconsistent with how regular authentication behaves.
    
    Only spin the spinner after typing the password.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922

 js/gdm/authPrompt.js  | 10 +++++++---
 js/gdm/loginDialog.js |  1 -
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 096db02b15..e36514aa03 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -157,8 +157,9 @@ var AuthPrompt = GObject.registerClass({
             });
 
             entry.clutter_text.connect('activate', () => {
+                let shouldSpin = entry === this._passwordEntry;
                 if (entry.reactive)
-                    this._prepareAndEmitNext();
+                    this._prepareAndEmitNext(shouldSpin);
             });
         });
 
@@ -177,9 +178,12 @@ var AuthPrompt = GObject.registerClass({
         this._defaultButtonWell.add_child(this._spinner);
     }
 
-    _prepareAndEmitNext() {
+    _prepareAndEmitNext(shouldSpin) {
         this.updateSensitivity(false);
-        this.startSpinning();
+
+        if (shouldSpin)
+            this.startSpinning();
+
         if (this._queryingService)
             this._userVerifier.answerQuery(this._queryingService, this._entry.text);
         else
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index ab995d7034..27d67cfa12 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -924,7 +924,6 @@ var LoginDialog = GObject.registerClass({
                 let answer = this._authPrompt.getAnswer();
                 this._user = this._userManager.get_user(answer);
                 this._authPrompt.clear();
-                this._authPrompt.startSpinning();
                 this._authPrompt.begin({ userName: answer });
                 this._updateCancelButton();
             });


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