[gnome-shell-extensions] dock: fix hide-effect dconf signal handler.
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] dock: fix hide-effect dconf signal handler.
- Date: Fri, 18 Nov 2011 17:39:34 +0000 (UTC)
commit b7e30eb99ac1eb455e98f22a52a6614b637d2f5b
Author: Stefan 'psYchotic' Zwanenburg <stefanhetzwaantje gmail com>
Date: Fri Oct 21 14:59:24 2011 +0200
dock: fix hide-effect dconf signal handler.
Prior to this fix, the variables 'enter_event' and 'leave_event' in the
handler for the 'changed' event for the
'/org/gnome/shell/extensions/dock/hide_effect' dconf key were
uninitialized. This made switching the hide effect at runtime throw an
error. By promoting these two variables to instance members and
assigning to them upon initialization, this problem should be fixed.
https://bugzilla.gnome.org/show_bug.cgi?id=662389
extensions/dock/extension.js | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/extensions/dock/extension.js b/extensions/dock/extension.js
index 02c9650..968721c 100644
--- a/extensions/dock/extension.js
+++ b/extensions/dock/extension.js
@@ -343,7 +343,6 @@ Dock.prototype = {
return;
hideEffect = this._settings.get_enum(DOCK_EFFECTHIDE_KEY);
- this.actor.y=0;
switch (hideEffect) {
case AutoHideEffect.RESCALE:
@@ -352,13 +351,13 @@ Dock.prototype = {
case AutoHideEffect.RESIZE:
this.actor.set_scale (1,1);
}
- this.actor.disconnect(leave_event);
- this.actor.disconnect(enter_event);
+ this.actor.disconnect(this._leave_event);
+ this.actor.disconnect(this._enter_event);
this._selectFunctionsHide ();
- leave_event = this.actor.connect('leave-event', Lang.bind(this, this._hideDock));
- enter_event = this.actor.connect('enter-event', Lang.bind(this, this._showDock));
+ this._leave_event = this.actor.connect('leave-event', Lang.bind(this, this._hideDock));
+ this._enter_event = this.actor.connect('enter-event', Lang.bind(this, this._showDock));
this._redisplay();
}));
@@ -369,8 +368,8 @@ Dock.prototype = {
autohide_animation_time = this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY);
}));
- this.actor.connect('leave-event', Lang.bind(this, this._hideDock));
- this.actor.connect('enter-event', Lang.bind(this, this._showDock));
+ this._leave_event = this.actor.connect('leave-event', Lang.bind(this, this._hideDock));
+ this._enter_event = this.actor.connect('enter-event', Lang.bind(this, this._showDock));
this._hideDock();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]