summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2011-09-02 10:11:55 +0200
committerXavier Claessens <xclaesse@gmail.com>2011-09-02 10:11:55 +0200
commit83c90bef429392a99e97c077a098b8890a833e51 (patch)
tree3ad0a78cf382abb0fdbd20d964480510f44222a9 /examples
parent56729b46480a21d43da33bc7dc9e854d9ed3093a (diff)
Do not mix static and dynamic GObject bindings in python examples
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/client/python/contact-list.py6
-rwxr-xr-xexamples/client/python/ensure-channel.py6
-rwxr-xr-xexamples/client/python/text-handler.py6
3 files changed, 9 insertions, 9 deletions
diff --git a/examples/client/python/contact-list.py b/examples/client/python/contact-list.py
index e8c2cd892..719222470 100755
--- a/examples/client/python/contact-list.py
+++ b/examples/client/python/contact-list.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
import os
-import gobject
-gobject.threads_init()
+from gi.repository import GObject
+GObject.threads_init()
from gi.repository import TelepathyGLib as Tp
@@ -25,7 +25,7 @@ def manager_prepared_cb(manager, result, loop):
if __name__ == '__main__':
Tp.debug_set_flags(os.getenv('EXAMPLE_DEBUG', ''))
- loop = gobject.MainLoop()
+ loop = GObject.MainLoop()
manager = Tp.AccountManager.dup()
factory = manager.get_factory()
factory.add_account_features([Tp.Account.get_feature_quark_connection()])
diff --git a/examples/client/python/ensure-channel.py b/examples/client/python/ensure-channel.py
index c480600fe..344b7dbd5 100755
--- a/examples/client/python/ensure-channel.py
+++ b/examples/client/python/ensure-channel.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
import sys
-import gobject
-gobject.threads_init()
+from gi.repository import GObject
+GObject.threads_init()
from gi.repository import TelepathyGLib
@@ -61,7 +61,7 @@ if __name__ == '__main__':
# FIXME: for some reason TelepathyGLib.USER_ACTION_TIME_CURRENT_TIME is
# not defined (bgo #639206)
- main_loop = gobject.MainLoop()
+ main_loop = GObject.MainLoop()
request.ensure_channel_async("", None, ensure_channel_cb, main_loop)
diff --git a/examples/client/python/text-handler.py b/examples/client/python/text-handler.py
index 1afb95b5a..352d81955 100755
--- a/examples/client/python/text-handler.py
+++ b/examples/client/python/text-handler.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
-import gobject
-gobject.threads_init()
+from gi.repository import GObject
+GObject.threads_init()
from gi.repository import TelepathyGLib
@@ -64,5 +64,5 @@ if __name__ == '__main__':
handler.register()
- main_loop = gobject.MainLoop()
+ main_loop = GObject.MainLoop()
main_loop.run()