8572: gramps crashes if gtk < 3.10

This commit is contained in:
Paul Franklin 2015-07-14 22:19:53 -07:00
parent d5670b65b7
commit 32c53eba82

View File

@ -48,6 +48,7 @@ _ = glocale.translation.gettext
MIN_PYGOBJECT_VERSION = (3, 3, 2)
PYGOBJ_ERR = False
MIN_GTK_VERSION = (3, 10)
try:
#import gnome introspection, part of pygobject
@ -94,6 +95,17 @@ except (ImportError, ValueError):
"Gramps will terminate now.")))
sys.exit(0)
gtk_major = Gtk.get_major_version()
gtk_minor = Gtk.get_minor_version()
if (gtk_major, gtk_minor) < MIN_GTK_VERSION:
print(_("Your Gtk version does not meet the requirements.\n"
"At least %(major)d.%(minor)d "
"is needed to start Gramps with a GUI.\n\n"
"Gramps will terminate now.") %
{ 'major' : MIN_GTK_VERSION[0],
'minor' : MIN_GTK_VERSION[1] } )
sys.exit(0)
try:
import cairo
except ImportError: