From 5ba8ac1445a029967518981a30ec101c71896fbb Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 12 Nov 2013 12:44:35 +0000 Subject: [PATCH] examples: explicitly ask for TelepathyGLib-0.12 TelepathyGLib-1 isn't going to be fully compatible. --- 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..f0080f4 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 = '0.12'; + 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 cfb1cad..3811853 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 = '0.12'; + 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..df854f1 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', '0.12') 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..844a808 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', '0.12') 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..9e46239 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', '0.12') 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..f56fa18 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', '0.12') 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..fe6f24f 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', '0.12') 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..cf3b838 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', '0.12') 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..b5ed677 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', '0.12') 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..69b5332 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', '0.12') 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..7a1d6e8 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', '0.12') from gi.repository import TelepathyGLib def echo_message(channel, msg, pending): -- 1.8.4.3