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
This commit is contained in:
parent
6a969b934f
commit
ffdb85e003
@ -1159,6 +1159,7 @@ const SourceActor = new Lang.Class({
|
|||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
||||||
this.actor.connect('destroy', Lang.bind(this, function() {
|
this.actor.connect('destroy', Lang.bind(this, function() {
|
||||||
|
this._source.disconnect(this._iconUpdatedId);
|
||||||
this._actorDestroyed = true;
|
this._actorDestroyed = true;
|
||||||
}));
|
}));
|
||||||
this._actorDestroyed = false;
|
this._actorDestroyed = false;
|
||||||
@ -1170,7 +1171,7 @@ const SourceActor = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.add_actor(this._iconBin);
|
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();
|
this._updateIcon();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1228,8 +1229,12 @@ const SourceActorWithLabel = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.add_actor(this._counterBin);
|
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._updateCount();
|
||||||
|
|
||||||
|
this.actor.connect('destroy', function() {
|
||||||
|
this._source.disconnect(this._countUpdatedId);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_allocate: function(actor, box, flags) {
|
_allocate: function(actor, box, flags) {
|
||||||
|
Loading…
Reference in New Issue
Block a user