[gnome-shell/gbsneto/new-lock-screen-part2: 30/56] screenShield: Remove unused 'onPrimary' argument



commit 01ff9fb3b95a93de0a8f8cd83f31aef758820c5c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Nov 28 18:53:46 2019 -0300

    screenShield: Remove unused 'onPrimary' argument
    
    The 'onPrimary' argument was being passed to dialog.open(). Turns out,
    neither UnlockDialog nor LoginDialog use this parameter.
    
    Remove the unnecessary 'onPrimary' parameter, and cleanup the related
    code.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872

 js/ui/screenShield.js | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index a30d79a9be..a8c00dadcc 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -118,14 +118,14 @@ var ScreenShield = class {
         this._smartcardManager.connect('smartcard-inserted',
                                        (manager, token) => {
                                            if (this._isLocked && token.UsedToLogin)
-                                               this._liftShield(true, 0);
+                                               this._liftShield(0);
                                        });
 
         this._oVirtCredentialsManager = OVirt.getOVirtCredentialsManager();
         this._oVirtCredentialsManager.connect('user-authenticated',
                                               () => {
                                                   if (this._isLocked)
-                                                      this._liftShield(true, 0);
+                                                      this._liftShield(0);
                                               });
 
         this._loginManager = LoginManager.getLoginManager();
@@ -219,9 +219,9 @@ var ScreenShield = class {
             this._createBackground(i);
     }
 
-    _liftShield(onPrimary, velocity) {
+    _liftShield(velocity) {
         if (this._isLocked) {
-            if (this._ensureUnlockDialog(onPrimary, true /* allowCancel */))
+            if (this._ensureUnlockDialog(true /* allowCancel */))
                 this._hideLockScreen(true /* animate */, velocity);
         } else {
             this.deactivate(true /* animate */);
@@ -280,11 +280,11 @@ var ScreenShield = class {
             return Clutter.EVENT_PROPAGATE;
 
         if (this._isLocked &&
-            this._ensureUnlockDialog(true, true) &&
+            this._ensureUnlockDialog(true) &&
             GLib.unichar_isgraph(unichar))
             this._dialog.addCharacter(unichar);
 
-        this._liftShield(true, 0);
+        this._liftShield(0);
         return Clutter.EVENT_STOP;
     }
 
@@ -302,7 +302,7 @@ var ScreenShield = class {
 
         // 7 standard scrolls to lift up
         if (this._lockScreenScrollCounter > 35)
-            this._liftShield(true, 0);
+            this._liftShield(0);
 
         return Clutter.EVENT_STOP;
     }
@@ -340,7 +340,7 @@ var ScreenShield = class {
         this._lockScreenState = MessageTray.State.HIDING;
 
         if (this._isLocked)
-            this._ensureUnlockDialog(false, false);
+            this._ensureUnlockDialog(false);
 
         return true;
     }
@@ -363,7 +363,7 @@ var ScreenShield = class {
         if (this._lockScreenGroup.translation_y < -(ARROW_DRAG_THRESHOLD * global.stage.height)) {
             // Complete motion automatically
             let [velocity_, velocityX_, velocityY] = this._dragAction.get_velocity(0);
-            this._liftShield(true, -velocityY);
+            this._liftShield(-velocityY);
         } else {
             // restore the lock screen to its original place
             // try to use the same speed as the normal animation
@@ -489,7 +489,7 @@ var ScreenShield = class {
         this.actor.show();
         this._isGreeter = Main.sessionMode.isGreeter;
         this._isLocked = true;
-        if (this._ensureUnlockDialog(true, true))
+        if (this._ensureUnlockDialog(true))
             this._hideLockScreen(false, 0);
     }
 
@@ -539,7 +539,7 @@ var ScreenShield = class {
         this._cursorTracker.set_pointer_visible(true);
     }
 
-    _ensureUnlockDialog(onPrimary, allowCancel) {
+    _ensureUnlockDialog(allowCancel) {
         if (!this._dialog) {
             let constructor = Main.sessionMode.unlockDialog;
             if (!constructor) {
@@ -551,7 +551,7 @@ var ScreenShield = class {
             this._dialog = new constructor(this._lockDialogGroup);
 
             let time = global.get_current_time();
-            if (!this._dialog.open(time, onPrimary)) {
+            if (!this._dialog.open(time)) {
                 // This is kind of an impossible error: we're already modal
                 // by the time we reach this...
                 log('Could not open login dialog: failed to acquire grab');


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