Commit 5f2e3f45 authored by Kai Willadsen's avatar Kai Willadsen

bin/meld: Use gi.require correctly

parent 7682c9d6
......@@ -158,8 +158,8 @@ def check_requirements():
# FIXME: Extra clause for gi
import gi
from gi.repository import Gtk
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
version = (Gtk.get_major_version(), Gtk.get_minor_version())
assert version >= gtk_requirement
except (ImportError, AssertionError) as e:
......@@ -172,6 +172,7 @@ def check_requirements():
missing_reqs("GLib", glib_requirement, e)
gi.require_version('GtkSource', '3.0')
from gi.repository import GtkSource
# TODO: There is no way to get at GtkSourceView's actual version
assert hasattr(GtkSource, 'SearchSettings')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment