screenShield: Cleanup unused parameters

This commit is contained in:
Georges Basile Stavracas Neto 2019-10-07 18:41:45 -03:00
parent 7a90b2d908
commit fe3d55eb80

View File

@ -99,14 +99,14 @@ var ScreenShield = class {
this._smartcardManager.connect('smartcard-inserted', this._smartcardManager.connect('smartcard-inserted',
(manager, token) => { (manager, token) => {
if (this._isLocked && token.UsedToLogin) if (this._isLocked && token.UsedToLogin)
this._liftShield(true, 0); this._liftShield();
}); });
this._oVirtCredentialsManager = OVirt.getOVirtCredentialsManager(); this._oVirtCredentialsManager = OVirt.getOVirtCredentialsManager();
this._oVirtCredentialsManager.connect('user-authenticated', this._oVirtCredentialsManager.connect('user-authenticated',
() => { () => {
if (this._isLocked) if (this._isLocked)
this._liftShield(true, 0); this._liftShield();
}); });
this._loginManager = LoginManager.getLoginManager(); this._loginManager = LoginManager.getLoginManager();
@ -215,9 +215,9 @@ var ScreenShield = class {
this._createBackground(i); this._createBackground(i);
} }
_liftShield(onPrimary, velocity) { _liftShield() {
if (this._isLocked) { if (this._isLocked) {
if (this._ensureUnlockDialog(onPrimary, true /* allowCancel */)) if (this._ensureUnlockDialog(true /* allowCancel */))
this._hideLockScreen(); this._hideLockScreen();
} else { } else {
this.deactivate(true /* animate */); this.deactivate(true /* animate */);
@ -265,7 +265,7 @@ var ScreenShield = class {
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
if (this._isLocked && if (this._isLocked &&
this._ensureUnlockDialog(true, true) && this._ensureUnlockDialog(true) &&
GLib.unichar_isgraph(unichar)) GLib.unichar_isgraph(unichar))
this._dialog.addCharacter(unichar); this._dialog.addCharacter(unichar);
@ -403,7 +403,7 @@ var ScreenShield = class {
this.actor.show(); this.actor.show();
this._isGreeter = Main.sessionMode.isGreeter; this._isGreeter = Main.sessionMode.isGreeter;
this._isLocked = true; this._isLocked = true;
if (this._ensureUnlockDialog(true, true)) if (this._ensureUnlockDialog(true))
this._hideLockScreen(); this._hideLockScreen();
} }
@ -424,7 +424,7 @@ var ScreenShield = class {
this._cursorTracker.set_pointer_visible(true); this._cursorTracker.set_pointer_visible(true);
} }
_ensureUnlockDialog(onPrimary, allowCancel) { _ensureUnlockDialog(allowCancel) {
if (!this._dialog) { if (!this._dialog) {
let constructor = Main.sessionMode.unlockDialog; let constructor = Main.sessionMode.unlockDialog;
if (!constructor) { if (!constructor) {
@ -437,7 +437,7 @@ var ScreenShield = class {
let time = global.get_current_time(); 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 // This is kind of an impossible error: we're already modal
// by the time we reach this... // by the time we reach this...
log('Could not open login dialog: failed to acquire grab'); log('Could not open login dialog: failed to acquire grab');
@ -465,7 +465,7 @@ var ScreenShield = class {
if (this._lockScreenState != MessageTray.State.HIDDEN) if (this._lockScreenState != MessageTray.State.HIDDEN)
return; return;
this._ensureUnlockDialog(false, false); this._ensureUnlockDialog(false);
this._lockScreenState = MessageTray.State.SHOWING; this._lockScreenState = MessageTray.State.SHOWING;