gui: require pygi version 3.30
This was the one that introduced the Gtk.Template class that we use. And better to have a meaningful exit than a crash. Fixes #197 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
e6ea60d6c1
commit
f24967ad12
|
@ -5,6 +5,13 @@ import sys
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
try:
|
||||||
|
# 3.30 is the first one with Gtk.Template
|
||||||
|
gi.check_version('3.30') # NOQA
|
||||||
|
except ValueError as e:
|
||||||
|
print(e, file=sys.stderr)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
gi.require_version('Gio', '2.0') # NOQA
|
gi.require_version('Gio', '2.0') # NOQA
|
||||||
gi.require_version('Gtk', '3.0') # NOQA
|
gi.require_version('Gtk', '3.0') # NOQA
|
||||||
from gi.repository import Gio, Gtk, Gdk
|
from gi.repository import Gio, Gtk, Gdk
|
||||||
|
|
Loading…
Reference in New Issue