diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-06 12:20:06 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-06 15:48:32 +0100 |
commit | 15eda6a121a36c19787255ada71f7b8e0e6ed762 (patch) | |
tree | 2c50da5956279d5c4a39ace74b1261f30e0458ee /examples/client | |
parent | de7e9b604dd50cb9fcadf3b226d049a9f3cf7ce3 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'examples/client')
-rwxr-xr-x | 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 352d81955..f9870a70b 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({ |