[d-feet] Specify the Wnck version to silence a warning



commit cddcaebf2f09cdc6b29a953bbc77d70fd67ad452
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jun 6 13:14:57 2017 +0200

    Specify the Wnck version to silence a warning
    
    Otherwise, we get:
      dfeet/wnck_utils.py:9: PyGIWarning: Wnck was imported without
        specifying a version first. Use gi.require_version('Wnck', '3.0')
        before import to ensure that the right version gets loaded.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783468

 src/dfeet/wnck_utils.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/dfeet/wnck_utils.py b/src/dfeet/wnck_utils.py
index ff92e72..2ba68a6 100644
--- a/src/dfeet/wnck_utils.py
+++ b/src/dfeet/wnck_utils.py
@@ -3,9 +3,11 @@
 # icon information. If the wnck module is not installed we fallback to default
 # behvior
 
+import gi
 from gi.repository import Gtk
 
 try:
+    gi.require_version('Wnck', '3.0')
     from gi.repository import Wnck
     has_libwnck = True
 except:


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