From b7e30eb99ac1eb455e98f22a52a6614b637d2f5b Mon Sep 17 00:00:00 2001 From: Stefan 'psYchotic' Zwanenburg Date: Fri, 21 Oct 2011 14:59:24 +0200 Subject: [PATCH] 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 file changed, 6 insertions(+), 7 deletions(-) diff --git a/extensions/dock/extension.js b/extensions/dock/extension.js index 02c9650b..968721ce 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(); },