From 78e2ddfba82977120d199ecef3c79664f68d2046 Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Tue, 19 Jan 2016 11:47:08 +0900 Subject: Fixed PyGIWarning: GdkX11 was imported without specifying a version --- engine/python2/engine.py | 9 +++++++-- engine/python2/factory.py | 7 +++++-- engine/python2/main.py | 8 ++++++-- engine/python2/thumb.py | 8 ++++++-- engine/python3/engine.py | 9 +++++++-- engine/python3/factory.py | 7 +++++-- engine/python3/main.py | 8 ++++++-- engine/python3/thumb.py | 8 ++++++-- setup/python2/main.py | 12 ++++++++++-- setup/python2/prefs.py | 8 ++++++-- setup/python3/main.py | 12 ++++++++++-- setup/python3/prefs.py | 8 ++++++-- 12 files changed, 80 insertions(+), 24 deletions(-) diff --git a/engine/python2/engine.py b/engine/python2/engine.py index fd1dc00..6a3fa6e 100644 --- a/engine/python2/engine.py +++ b/engine/python2/engine.py @@ -4,8 +4,8 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang -# Copyright (c) 2010-2015 Takao Fujiwara -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -35,6 +35,11 @@ try: except: pass +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('IBus', '1.0') +gi_require_version('Anthy', '9000') + from gi.repository import GLib from gi.repository import IBus diff --git a/engine/python2/factory.py b/engine/python2/factory.py index 42dee0a..8aec2b2 100644 --- a/engine/python2/factory.py +++ b/engine/python2/factory.py @@ -4,8 +4,8 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang -# Copyright (c) 2010-2015 Takao Fujiwara -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,6 +24,9 @@ import os import sys +from gi import require_version as gi_require_version +gi_require_version('IBus', '1.0') + from gi.repository import IBus import _config as config diff --git a/engine/python2/main.py b/engine/python2/main.py index a6af1af..096cd41 100644 --- a/engine/python2/main.py +++ b/engine/python2/main.py @@ -4,8 +4,8 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang -# Copyright (c) 2010-2015 Takao Fujiwara -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,6 +28,10 @@ import getopt import locale import xml.dom.minidom +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('IBus', '1.0') + from gi.repository import GLib # set_prgname before importing factory to show the name in warning diff --git a/engine/python2/thumb.py b/engine/python2/thumb.py index afeefd7..6cb6980 100644 --- a/engine/python2/thumb.py +++ b/engine/python2/thumb.py @@ -5,8 +5,8 @@ # # Copyright (c) 2007-2008 Peng Huang # Copyright (c) 2009 Hideaki ABE -# Copyright (c) 2010-2015 Takao Fujiwara -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,6 +29,10 @@ __all__ = ( import sys +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('IBus', '1.0') + from gi.repository import GLib from gi.repository import IBus diff --git a/engine/python3/engine.py b/engine/python3/engine.py index 523e246..3a8df72 100644 --- a/engine/python3/engine.py +++ b/engine/python3/engine.py @@ -4,8 +4,8 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang -# Copyright (c) 2010-2015 Takao Fujiwara -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -36,6 +36,11 @@ try: except: pass +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('IBus', '1.0') +gi_require_version('Anthy', '9000') + from gi.repository import GLib from gi.repository import IBus diff --git a/engine/python3/factory.py b/engine/python3/factory.py index e51faad..4d5cf9f 100644 --- a/engine/python3/factory.py +++ b/engine/python3/factory.py @@ -4,8 +4,8 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang -# Copyright (c) 2010-2015 Takao Fujiwara -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,6 +24,9 @@ import os import sys +from gi import require_version as gi_require_version +gi_require_version('IBus', '1.0') + from gi.repository import IBus import _config as config diff --git a/engine/python3/main.py b/engine/python3/main.py index 8c5b02a..1a2e6fd 100644 --- a/engine/python3/main.py +++ b/engine/python3/main.py @@ -4,8 +4,8 @@ # ibus-anthy - The Anthy engine for IBus # # Copyright (c) 2007-2008 Peng Huang -# Copyright (c) 2010-2015 Takao Fujiwara -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,6 +28,10 @@ import getopt import locale import xml.dom.minidom +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('IBus', '1.0') + from gi.repository import GLib # set_prgname before importing factory to show the name in warning diff --git a/engine/python3/thumb.py b/engine/python3/thumb.py index 59c0e38..9a5604e 100644 --- a/engine/python3/thumb.py +++ b/engine/python3/thumb.py @@ -5,8 +5,8 @@ # # Copyright (c) 2007-2008 Peng Huang # Copyright (c) 2009 Hideaki ABE -# Copyright (c) 2010-2015 Takao Fujiwara -# Copyright (c) 2007-2015 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,6 +29,10 @@ __all__ = ( import sys +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('IBus', '1.0') + from gi.repository import GLib from gi.repository import IBus diff --git a/setup/python2/main.py b/setup/python2/main.py index 458cbf8..c49a9cc 100644 --- a/setup/python2/main.py +++ b/setup/python2/main.py @@ -4,8 +4,8 @@ # # Copyright (c) 2007-2008 Peng Huang # Copyright (c) 2009 Hideaki ABE -# Copyright (c) 2010-2014 Takao Fujiwara -# Copyright (c) 2007-2014 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,6 +28,14 @@ import xml.dom.minidom import gettext from gettext import dgettext +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('Gtk', '3.0') +gi_require_version('Gdk', '3.0') +gi_require_version('GdkX11', '3.0') +gi_require_version('Pango', '1.0') +gi_require_version('IBus', '1.0') + from gi.repository import GLib # set_prgname before importing other modules to show the name in warning diff --git a/setup/python2/prefs.py b/setup/python2/prefs.py index 1b88908..520742e 100644 --- a/setup/python2/prefs.py +++ b/setup/python2/prefs.py @@ -4,8 +4,8 @@ # # Copyright (c) 2007-2008 Peng Huang # Copyright (c) 2009 Hideaki ABE -# Copyright (c) 2010-2013 Takao Fujiwara -# Copyright (c) 2007-2013 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,6 +23,10 @@ import sys +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('IBus', '1.0') + from gi.repository import GLib from gi.repository import IBus diff --git a/setup/python3/main.py b/setup/python3/main.py index 5c74c83..6346e43 100644 --- a/setup/python3/main.py +++ b/setup/python3/main.py @@ -4,8 +4,8 @@ # # Copyright (c) 2007-2008 Peng Huang # Copyright (c) 2009 Hideaki ABE -# Copyright (c) 2010-2014 Takao Fujiwara -# Copyright (c) 2007-2014 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -31,6 +31,14 @@ import xml.dom.minidom import gettext from gettext import dgettext +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('Gtk', '3.0') +gi_require_version('Gdk', '3.0') +gi_require_version('GdkX11', '3.0') +gi_require_version('Pango', '1.0') +gi_require_version('IBus', '1.0') + from gi.repository import GLib # set_prgname before importing other modules to show the name in warning diff --git a/setup/python3/prefs.py b/setup/python3/prefs.py index a4af88d..269e353 100644 --- a/setup/python3/prefs.py +++ b/setup/python3/prefs.py @@ -4,8 +4,8 @@ # # Copyright (c) 2007-2008 Peng Huang # Copyright (c) 2009 Hideaki ABE -# Copyright (c) 2010-2014 Takao Fujiwara -# Copyright (c) 2007-2014 Red Hat, Inc. +# Copyright (c) 2010-2016 Takao Fujiwara +# Copyright (c) 2007-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,6 +23,10 @@ import sys +from gi import require_version as gi_require_version +gi_require_version('GLib', '2.0') +gi_require_version('IBus', '1.0') + from gi.repository import GLib from gi.repository import IBus -- cgit v1.2.1