[gnome-shell] authPrompt: Do not enable sensitivity if retries are disallowed



commit 8f848925f6cdae0d96c355faa8acc2b0d45ab16c
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Tue May 29 03:00:04 2018 +0300

    authPrompt: Do not enable sensitivity if retries are disallowed
    
    Set the sensitivity of the UI according to the canRetry parameter and thus
    if no more logins are allowed don't take any input.
    
    Fixes #311

 js/gdm/authPrompt.js | 4 ++--
 js/gdm/util.js       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index d9ec7eea8..a0a4a21d6 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -242,11 +242,11 @@ var AuthPrompt = new Lang.Class({
         this.emit('prompted');
     },
 
-    _onVerificationFailed() {
+    _onVerificationFailed(userVerifier, canRetry) {
         this._queryingService = null;
         this.clear();
 
-        this.updateSensitivity(true);
+        this.updateSensitivity(canRetry);
         this.setActorInDefaultButtonWell(null);
         this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
     },
diff --git a/js/gdm/util.js b/js/gdm/util.js
index 75feb77d0..1c6150eda 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -565,7 +565,7 @@ var ShellUserVerifier = new Lang.Class({
             }
         }
 
-        this.emit('verification-failed');
+        this.emit('verification-failed', canRetry);
     },
 
     _onConversationStopped(client, serviceName) {


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