[gnome-shell] TelepathyClient: disconnect signals from destroyed ChatSources
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] TelepathyClient: disconnect signals from destroyed ChatSources
- Date: Tue, 28 Jan 2014 20:51:29 +0000 (UTC)
commit ccfc9f3ab06e33c5f25c0765f646143a33908f1b
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Jan 20 23:21:14 2014 +0100
TelepathyClient: disconnect signals from destroyed ChatSources
Otherwise they keep firing if the source is destroyed by the user
and they trigger Clutter warnings from touching invalid actors.
https://bugzilla.gnome.org/show_bug.cgi?id=722660
js/ui/components/telepathyClient.js | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js
index e69c2a1..144d369 100644
--- a/js/ui/components/telepathyClient.js
+++ b/js/ui/components/telepathyClient.js
@@ -621,7 +621,11 @@ const ChatSource = new Lang.Class({
this.notify();
},
- _channelClosed: function() {
+ destroy: function(reason) {
+ if (this._destroyed)
+ return;
+
+ this._destroyed = true;
this._channel.disconnect(this._closedId);
this._channel.disconnect(this._receivedId);
this._channel.disconnect(this._pendingId);
@@ -631,7 +635,14 @@ const ChatSource = new Lang.Class({
this._contact.disconnect(this._notifyAvatarId);
this._contact.disconnect(this._presenceChangedId);
- this.destroy();
+ if (this._timestampTimeoutId)
+ Mainloop.source_remove(this._timestampTimeoutId);
+
+ this.parent(reason);
+ },
+
+ _channelClosed: function() {
+ this.destroy(MessageTray.NotificationDestroyedReason.SOURCE_CLOSED);
},
/* All messages are new messages for Telepathy sources */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]