Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added statement "gi.require_version(..)" - this is needed before Gtk imports #12

Merged
merged 2 commits into from
Feb 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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