Blame SOURCES/0005-Ensure-that-the-right-version-of-Gtk-gets-loaded.patch

dc24c4
From ab4c282729847338e97d236342d21fabd7cfb3aa Mon Sep 17 00:00:00 2001
dc24c4
From: Jakub Filak <jfilak@redhat.com>
dc24c4
Date: Mon, 24 Aug 2015 10:28:39 +0200
dc24c4
Subject: [PATCH] Ensure that the right version of Gtk gets loaded
dc24c4
dc24c4
As suggested by PyGIWarning:
dc24c4
dc24c4
    /usr/lib/python3.4/site-packages/pyfros/controls.py:22: PyGIWarning:
dc24c4
    Gtk was imported without specifying a version first. Use
dc24c4
    gi.require_version('Gtk', '3.0') before import to ensure that the
dc24c4
    right version gets loaded.
dc24c4
          from gi.repository import Gtk
dc24c4
dc24c4
Signed-off-by: Jakub Filak <jfilak@redhat.com>
dc24c4
---
dc24c4
 src/pyfros/controls.py | 4 ++++
dc24c4
 1 file changed, 4 insertions(+)
dc24c4
dc24c4
diff --git a/src/pyfros/controls.py b/src/pyfros/controls.py
dc24c4
index 0593ef7..b64cf8b 100644
dc24c4
--- a/src/pyfros/controls.py
dc24c4
+++ b/src/pyfros/controls.py
dc24c4
@@ -15,6 +15,10 @@
dc24c4
 ## along with this program; if not, write to the Free Software
dc24c4
 ## Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335  USA
dc24c4
 
dc24c4
+# As suggested by a PyGIWarning
dc24c4
+import gi
dc24c4
+gi.require_version('Gtk', '3.0')
dc24c4
+
dc24c4
 # pylint has troubles importing from gi.repository because
dc24c4
 # it uses introspection
dc24c4
 # pylint: disable=E0611
dc24c4
-- 
dc24c4
2.5.0
dc24c4