diff --git a/.gitignore b/.gitignore index 0d20b64..75dccb6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ *.pyc +/build/ +/udev-discover +/udevdiscover/ diff --git a/udev-discover.in b/udev-discover.in index 20c4b55..878729f 100644 --- a/udev-discover.in +++ b/udev-discover.in @@ -22,6 +22,11 @@ ### import sys + +# (http://mednis.info/use-girequire_versiongtk-30-before-import.html) +import gi +gi.require_version("Gtk", "3.0") + from gi.repository import Gtk, Gdk from gi.repository import GObject import logging diff --git a/udevdiscover/device/__init__.py b/udevdiscover/device/__init__.py index 0e1ac20..08c3879 100644 --- a/udevdiscover/device/__init__.py +++ b/udevdiscover/device/__init__.py @@ -22,6 +22,9 @@ # Authors : J. Félix Ontañón # +# (http://mednis.info/use-girequire_versiongtk-30-before-import.html) +import gi +gi.require_version("Gtk", "3.0") from gi.repository import GUdev def match_string(device, search_string): diff --git a/udevdiscover/devicefinder.py b/udevdiscover/devicefinder.py index eb2fe6b..351f9a1 100644 --- a/udevdiscover/devicefinder.py +++ b/udevdiscover/devicefinder.py @@ -22,6 +22,9 @@ # Authors : J. Félix Ontañón # +# (http://mednis.info/use-girequire_versiongtk-30-before-import.html) +import gi +gi.require_version("GUdev", "1.0") from gi.repository import GObject from gi.repository import GUdev import device diff --git a/udevdiscover/utils.py b/udevdiscover/utils.py index e3f6b4a..aee49d2 100644 --- a/udevdiscover/utils.py +++ b/udevdiscover/utils.py @@ -22,6 +22,9 @@ import exceptions import types +# (http://mednis.info/use-girequire_versiongtk-30-before-import.html) +import gi +gi.require_version("GConf", "2.0") from gi.repository import GConf class GConfKeysDict(dict):