[gnome-shell] messageTray: add some missing signal disconnections
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageTray: add some missing signal disconnections
- Date: Mon, 13 Oct 2014 15:50:39 +0000 (UTC)
commit ffdb85e00361780ecea8b4e1b1bdf6647cbe49c8
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Oct 9 14:31:04 2014 -0400
messageTray: add some missing signal disconnections
Disconnect some signal connections that weren't disconnected on actor destroy
(not the result of comprehensive review.)
https://bugzilla.gnome.org/show_bug.cgi?id=738256
js/ui/messageTray.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index fb0b0ef..cedb410 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1159,6 +1159,7 @@ const SourceActor = new Lang.Class({
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
this.actor.connect('allocate', Lang.bind(this, this._allocate));
this.actor.connect('destroy', Lang.bind(this, function() {
+ this._source.disconnect(this._iconUpdatedId);
this._actorDestroyed = true;
}));
this._actorDestroyed = false;
@@ -1170,7 +1171,7 @@ const SourceActor = new Lang.Class({
this.actor.add_actor(this._iconBin);
- this._source.connect('icon-updated', Lang.bind(this, this._updateIcon));
+ this._iconUpdatedId = this._source.connect('icon-updated', Lang.bind(this, this._updateIcon));
this._updateIcon();
},
@@ -1228,8 +1229,12 @@ const SourceActorWithLabel = new Lang.Class({
this.actor.add_actor(this._counterBin);
- this._source.connect('count-updated', Lang.bind(this, this._updateCount));
+ this._countUpdatedId = this._source.connect('count-updated', Lang.bind(this, this._updateCount));
this._updateCount();
+
+ this.actor.connect('destroy', function() {
+ this._source.disconnect(this._countUpdatedId);
+ });
},
_allocate: function(actor, box, flags) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]