From 5da05056620f6a3a8237fce662a4f32e1212774a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 6 Sep 2013 12:20:06 +0100 Subject: [PATCH 18/19] 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. --- examples/client/python/text-handler.py | 4 ++-- 1 file 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({ -- 1.8.4.rc3