[gnome-shell] ScreenShield: switch resetLockScreen to accept keyword arguments
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] ScreenShield: switch resetLockScreen to accept keyword arguments
- Date: Tue, 20 Aug 2013 19:53:19 +0000 (UTC)
commit 32613ba5445276336ff6d271246b28a5e3dee289
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sun May 12 17:32:02 2013 +0200
ScreenShield: switch resetLockScreen to accept keyword arguments
Having two booleans as argument is just confusing.
https://bugzilla.gnome.org/show_bug.cgi?id=699112
js/ui/screenShield.js | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 942f3eb..8a13c56 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -979,10 +979,11 @@ const ScreenShield = new Lang.Class({
},
_onUnlockFailed: function() {
- this._resetLockScreen(true, false);
+ this._resetLockScreen({ animateLockScreen: true,
+ animateLockDialog: false });
},
- _resetLockScreen: function(animateLockScreen, animateLockDialog) {
+ _resetLockScreen: function(params) {
// Don't reset the lock screen unless it is completely hidden
// This prevents the shield going down if the lock-delay timeout
// fires while the user is dragging (which has the potential
@@ -997,7 +998,7 @@ const ScreenShield = new Lang.Class({
this._lockScreenGroup.show();
this._lockScreenState = MessageTray.State.SHOWING;
- if (animateLockScreen) {
+ if (params.animateLockScreen) {
this._lockScreenGroup.y = -global.screen_height;
Tweener.removeTweens(this._lockScreenGroup);
Tweener.addTween(this._lockScreenGroup,
@@ -1014,7 +1015,7 @@ const ScreenShield = new Lang.Class({
this._lockScreenShown();
}
- if (animateLockDialog) {
+ if (params.animateLockDialog) {
this._lockDialogGroup.opacity = 0;
Tweener.removeTweens(this._lockDialogGroup);
Tweener.addTween(this._lockDialogGroup,
@@ -1258,7 +1259,8 @@ const ScreenShield = new Lang.Class({
Main.sessionMode.pushMode('unlock-dialog');
}
- this._resetLockScreen(animate, animate);
+ this._resetLockScreen({ animateLockScreen: animate,
+ animateLockDialog: animate });
global.set_runtime_state(LOCKED_STATE_STR, GLib.Variant.new('b', true));
// We used to set isActive and emit active-changed here,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]