From 39f90eb6487d9d7e27d8b62e3d2f1760f20319f9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 12 Nov 2013 13:57:23 +0000 Subject: [PATCH 2/2] examples: explicitly ask for TelepathyGLib-1 --- examples/client/js/contact-list.js | 3 +++ examples/client/js/debug-client.js | 3 +++ examples/client/python/contact-list.py | 2 ++ examples/client/python/dialler.py | 2 ++ examples/client/python/ensure-channel.py | 3 +++ examples/client/python/file-transfer.py | 3 +++ examples/client/python/ft-handler.py | 3 +++ examples/client/python/inspect-cm.py | 2 ++ examples/client/python/stream-tube-accepter.py | 2 ++ examples/client/python/stream-tube-offerer.py | 2 ++ examples/client/python/text-handler.py | 3 +++ 11 files changed, 28 insertions(+) diff --git a/examples/client/js/contact-list.js b/examples/client/js/contact-list.js index e0112f7..f01687b 100755 --- a/examples/client/js/contact-list.js +++ b/examples/client/js/contact-list.js @@ -1,5 +1,8 @@ #! /usr/bin/gjs +const Gi = imports.gi; +Gi.versions.TelepathyGLib = '1'; + const Tp = imports.gi.TelepathyGLib; const Mainloop = imports.mainloop; diff --git a/examples/client/js/debug-client.js b/examples/client/js/debug-client.js index 405608b..022bd14 100755 --- a/examples/client/js/debug-client.js +++ b/examples/client/js/debug-client.js @@ -18,6 +18,9 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +const Gi = imports.gi; +Gi.versions.TelepathyGLib = '1'; + const GLib = imports.gi.GLib; const Gio = imports.gi.Gio; const Lang = imports.lang; diff --git a/examples/client/python/contact-list.py b/examples/client/python/contact-list.py index 7192224..acb24bc 100755 --- a/examples/client/python/contact-list.py +++ b/examples/client/python/contact-list.py @@ -1,9 +1,11 @@ #!/usr/bin/env python import os +import gi from gi.repository import GObject GObject.threads_init() +gi.require_version('TelepathyGLib', '1') from gi.repository import TelepathyGLib as Tp def manager_prepared_cb(manager, result, loop): diff --git a/examples/client/python/dialler.py b/examples/client/python/dialler.py index e988b11..66dcce2 100755 --- a/examples/client/python/dialler.py +++ b/examples/client/python/dialler.py @@ -20,10 +20,12 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +import gi from gi.repository import GLib from gi.repository import GObject from gi.repository import Gio from gi.repository import Gtk +gi.require_version('TelepathyGLib', '1') from gi.repository import TelepathyGLib as Tp import sys diff --git a/examples/client/python/ensure-channel.py b/examples/client/python/ensure-channel.py index 344b7db..310fff6 100755 --- a/examples/client/python/ensure-channel.py +++ b/examples/client/python/ensure-channel.py @@ -1,9 +1,12 @@ #!/usr/bin/env python import sys +import gi + from gi.repository import GObject GObject.threads_init() +gi.require_version('TelepathyGLib', '1') from gi.repository import TelepathyGLib def usage(): diff --git a/examples/client/python/file-transfer.py b/examples/client/python/file-transfer.py index cccfae8..6850d45 100755 --- a/examples/client/python/file-transfer.py +++ b/examples/client/python/file-transfer.py @@ -3,10 +3,13 @@ import sys import os import mimetypes +import gi + from gi.repository import GObject GObject.threads_init() from gi.repository import Gio +gi.require_version('TelepathyGLib', '1') from gi.repository import TelepathyGLib def usage(): diff --git a/examples/client/python/ft-handler.py b/examples/client/python/ft-handler.py index d1ac177..3d457da 100644 --- a/examples/client/python/ft-handler.py +++ b/examples/client/python/ft-handler.py @@ -1,10 +1,13 @@ #!/usr/bin/env python import sys +import gi + from gi.repository import GObject GObject.threads_init() from gi.repository import Gio +gi.require_version('TelepathyGLib', '1') from gi.repository import TelepathyGLib def usage(): diff --git a/examples/client/python/inspect-cm.py b/examples/client/python/inspect-cm.py index 0564078..457f72c 100644 --- a/examples/client/python/inspect-cm.py +++ b/examples/client/python/inspect-cm.py @@ -1,7 +1,9 @@ #!/usr/bin/env python import sys +import gi from gi.repository import GObject +gi.require_version('TelepathyGLib', '1') from gi.repository import TelepathyGLib as Tp def describe(cm): diff --git a/examples/client/python/stream-tube-accepter.py b/examples/client/python/stream-tube-accepter.py index 0720ae7..2ab960e 100755 --- a/examples/client/python/stream-tube-accepter.py +++ b/examples/client/python/stream-tube-accepter.py @@ -2,7 +2,9 @@ import os +import gi from gi.repository import GObject, Gio +gi.require_version('TelepathyGLib', '1') from gi.repository import TelepathyGLib as Tp def tube_conn_closed(tube, error): diff --git a/examples/client/python/stream-tube-offerer.py b/examples/client/python/stream-tube-offerer.py index 1f4309d..65eb528 100755 --- a/examples/client/python/stream-tube-offerer.py +++ b/examples/client/python/stream-tube-offerer.py @@ -3,7 +3,9 @@ import sys import os +import gi from gi.repository import GObject, Gio +gi.require_version('TelepathyGLib', '1') from gi.repository import TelepathyGLib as Tp def usage(): diff --git a/examples/client/python/text-handler.py b/examples/client/python/text-handler.py index f9870a7..6b1c0e3 100755 --- a/examples/client/python/text-handler.py +++ b/examples/client/python/text-handler.py @@ -1,8 +1,11 @@ #!/usr/bin/env python +import gi + from gi.repository import GObject GObject.threads_init() +gi.require_version('TelepathyGLib', '1') from gi.repository import TelepathyGLib def echo_message(channel, msg, pending): -- 1.8.4.3