Skip to content

Commit

Permalink
Merge pull request #12 from ufkub/master
Browse files Browse the repository at this point in the history
added statement "gi.require_version(..)" - this is needed before Gtk imports
  • Loading branch information
fontanon authored Feb 4, 2018
2 parents dd15309 + a5ba6f3 commit 3f5cf81
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*.pyc
/build/
/udev-discover
/udevdiscover/
5 changes: 5 additions & 0 deletions udev-discover.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions udevdiscover/device/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
# Authors : J. Félix Ontañón <fontanon@emergya.es>
#

# (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):
Expand Down
3 changes: 3 additions & 0 deletions udevdiscover/devicefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
# Authors : J. Félix Ontañón <fontanon@emergya.es>
#

# (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
Expand Down
3 changes: 3 additions & 0 deletions udevdiscover/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 3f5cf81

Please sign in to comment.