[gnome-shell] telepathyClient.js: use ShellTpClient instead of TpSimpleObserver



commit 2028f33e3856e05c166919c286469d4ffd40cce8
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Mar 23 11:22:42 2011 +0100

    telepathyClient.js: use ShellTpClient instead of TpSimpleObserver
    
    https://bugzilla.gnome.org/show_bug.cgi?id=645585

 js/ui/telepathyClient.js |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
index 33f4e87..5e3f33c 100644
--- a/js/ui/telepathyClient.js
+++ b/js/ui/telepathyClient.js
@@ -80,14 +80,9 @@ Client.prototype = {
         // The second argument, recover, means _observeChannels will be run
         // for any existing channel as well.
         let dbus = Tp.DBusDaemon.dup();
-        this._observer = Tp.SimpleObserver.new(dbus, true, 'GnomeShell', true,
-                                              Lang.bind(this, this._observeChannels));
-
-        // We only care about single-user text-based chats
-        let props = {};
-        props[Tp.PROP_CHANNEL_CHANNEL_TYPE] = Tp.IFACE_CHANNEL_TYPE_TEXT;
-        props[Tp.PROP_CHANNEL_TARGET_HANDLE_TYPE] = Tp.HandleType.CONTACT;
-        this._observer.add_observer_filter(props);
+        this._observer = Shell.TpClient.new(dbus);
+        this._observer.set_observe_channels_func(
+            Lang.bind(this, this._observeChannels));
 
         try {
             this._observer.register();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]