[gnome-shell] index Source objects using the associated channel path
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] index Source objects using the associated channel path
- Date: Wed, 16 Feb 2011 09:16:20 +0000 (UTC)
commit 02bcce07bdba033d9839c992742be8734e2ca8a0
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Feb 9 10:40:24 2011 +0100
index Source objects using the associated channel path
js/ui/telepathyClient.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
index 184c46b..73d8ec3 100644
--- a/js/ui/telepathyClient.js
+++ b/js/ui/telepathyClient.js
@@ -42,6 +42,7 @@ function Client() {
Client.prototype = {
_init : function() {
this._accounts = {};
+ // channel path -> Source
this._sources = {};
// Set up a SimpleObserver, which will call _observeChannels whenever a
@@ -68,7 +69,6 @@ Client.prototype = {
_observeChannels: function(observer, account, conn, channels,
dispatchOp, requests, context) {
let connPath = conn.get_object_path();
-
let len = channels.length;
for (let i = 0; i < len; i++) {
let channel = channels[i];
@@ -98,15 +98,15 @@ Client.prototype = {
return;
/* We got the TpContact */
- if (this._sources[connPath + ':' + targetHandle])
+ if (this._sources[chan.get_object_path()])
return;
let source = new Source(account, conn, chan, contacts[0]);
- this._sources[connPath + ':' + targetHandle] = source;
+ this._sources[chan.get_object_path()] = source;
source.connect('destroy', Lang.bind(this,
function() {
- delete this._sources[connPath + ':' + targetHandle];
+ delete this._sources[chan.get_object_path()];
}));
}));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]