telepathy-glib: Python text handler: ensure that we get a Tp. AutomaticClientFactory

Simon McVittie smcv at kemper.freedesktop.org
Fri Sep 6 08:09:12 PDT 2013


Module: telepathy-glib
Branch: master
Commit: 15eda6a121a36c19787255ada71f7b8e0e6ed762
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=15eda6a121a36c19787255ada71f7b8e0e6ed762

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Fri Sep  6 12:20:06 2013 +0100

Python text handler: ensure that we get a Tp.AutomaticClientFactory

We want a Tp.TextChannel, not just a Tp.Channel, and the easiest way
to do that is to use Tp.AccountManager.dup() (which provides a
Tp.AutomaticClientFactory). Tp.SimpleHandler.new() is deprecated,
for approximately this reason.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54061
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>

---

 examples/client/python/text-handler.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/client/python/text-handler.py b/examples/client/python/text-handler.py
index 352d819..f9870a7 100755
--- a/examples/client/python/text-handler.py
+++ b/examples/client/python/text-handler.py
@@ -50,9 +50,9 @@ def handle_channels_cb(handler, account, connection, channels, requests,
 if __name__ == '__main__':
     #TelepathyGLib.debug_set_flags("all")
 
-    dbus = TelepathyGLib.DBusDaemon.dup()
+    am = TelepathyGLib.AccountManager.dup()
 
-    handler = TelepathyGLib.SimpleHandler.new(dbus, False, False,
+    handler = TelepathyGLib.SimpleHandler.new_with_am(am, False, False,
         'ExampleHandler', False, handle_channels_cb, None)
 
     handler.add_handler_filter({



More information about the telepathy-commits mailing list