[pybliographer/wip/gtk3] ui: Fix warnings when loading GI repositories



commit 36eaadb48a555f2638e331274119f88f510e93c0
Author: Germán Poo-Caamaño <gpoo gnome org>
Date:   Sat Oct 7 00:10:40 2017 -0300

    ui: Fix warnings when loading GI repositories

 Pyblio/GnomeUI/Utils.py    |    2 ++
 Pyblio/GnomeUI/__init__.py |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/Pyblio/GnomeUI/Utils.py b/Pyblio/GnomeUI/Utils.py
index 5193d7c..7b22ea6 100644
--- a/Pyblio/GnomeUI/Utils.py
+++ b/Pyblio/GnomeUI/Utils.py
@@ -23,7 +23,9 @@
 ''' Utility functions for Gnome Interface management. '''
 
 import os
+import gi
 
+gi.require_versions({'GConf': '2.0'})
 from gi.repository import Gtk, Pango, Gdk, GConf
 
 from Pyblio import Config, version
diff --git a/Pyblio/GnomeUI/__init__.py b/Pyblio/GnomeUI/__init__.py
index f842135..618b178 100644
--- a/Pyblio/GnomeUI/__init__.py
+++ b/Pyblio/GnomeUI/__init__.py
@@ -31,6 +31,9 @@ files    = sys.argv [2:]
 sys.argv = sys.argv [:2] + ['--'] + files
 
 # correctly identify the program
+import gi
+
+gi.require_versions({'Gtk': '3.0'})
 from gi.repository import Gtk
 
 from Pyblio import version


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]