[meld] bin/meld: Use gi.require correctly
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] bin/meld: Use gi.require correctly
- Date: Sat, 14 Nov 2015 02:56:54 +0000 (UTC)
commit 5f2e3f459725e26439b2ee906e51591b4ef7a294
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Nov 14 12:56:06 2015 +1000
bin/meld: Use gi.require correctly
bin/meld | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index 4756305..43866ea 100755
--- a/bin/meld
+++ b/bin/meld
@@ -158,8 +158,8 @@ def check_requirements():
try:
# 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)
try:
+ 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')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]