[gnome-shell-extensions] dock: dispose of settings before getting rid of it
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] dock: dispose of settings before getting rid of it
- Date: Thu, 22 Dec 2011 17:09:28 +0000 (UTC)
commit 631f88ff42c9fed152f483764f3295f95fbcdddd
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Dec 22 15:15:16 2011 +0100
dock: dispose of settings before getting rid of it
Calling run_dispose on a GObject automatically disconnects all
signals, which is exactly what we need.
extensions/dock/extension.js | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
---
diff --git a/extensions/dock/extension.js b/extensions/dock/extension.js
index 032dfb9..442f0e7 100644
--- a/extensions/dock/extension.js
+++ b/extensions/dock/extension.js
@@ -386,9 +386,6 @@ Dock.prototype = {
//hidden
this._settings.connect('changed::'+DOCK_POSITION_KEY, Lang.bind(this, function (){
- if (!this._settings)
- return;
-
let primary = Main.layoutManager.primaryMonitor;
position = this._settings.get_enum(DOCK_POSITION_KEY);
this.actor.y=primary.y;
@@ -396,17 +393,11 @@ Dock.prototype = {
}));
this._settings.connect('changed::'+DOCK_SIZE_KEY, Lang.bind(this, function (){
- if (!this._settings)
- return;
-
dockicon_size = this._settings.get_int(DOCK_SIZE_KEY);
this._redisplay();
}));
this._settings.connect('changed::'+DOCK_HIDE_KEY, Lang.bind(this, function (){
- if (!this._settings)
- return;
-
Main.layoutManager.removeChrome(this.actor);
Main.layoutManager.addChrome(this.actor,
{ affectsStruts: !this._settings.get_boolean(DOCK_HIDE_KEY) });
@@ -422,9 +413,6 @@ Dock.prototype = {
}));
this._settings.connect('changed::'+DOCK_EFFECTHIDE_KEY, Lang.bind(this, function () {
- if (!this._settings)
- return;
-
hideEffect = this._settings.get_enum(DOCK_EFFECTHIDE_KEY);
switch (hideEffect) {
@@ -448,9 +436,6 @@ Dock.prototype = {
}));
this._settings.connect('changed::'+DOCK_AUTOHIDE_ANIMATION_TIME_KEY, Lang.bind(this,function (){
- if (!this._settings)
- return;
-
autohide_animation_time = this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY);
}));
@@ -489,6 +474,7 @@ Dock.prototype = {
this.actor.destroy();
// Break reference cycles
+ this._settings.run_dispose();
this._settings = null;
this._appSystem = null;
this._tracker = null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]