8572: gramps crashes if gtk < 3.10
This commit is contained in:
parent
d5670b65b7
commit
32c53eba82
@ -48,6 +48,7 @@ _ = glocale.translation.gettext
|
|||||||
|
|
||||||
MIN_PYGOBJECT_VERSION = (3, 3, 2)
|
MIN_PYGOBJECT_VERSION = (3, 3, 2)
|
||||||
PYGOBJ_ERR = False
|
PYGOBJ_ERR = False
|
||||||
|
MIN_GTK_VERSION = (3, 10)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
#import gnome introspection, part of pygobject
|
#import gnome introspection, part of pygobject
|
||||||
@ -94,6 +95,17 @@ except (ImportError, ValueError):
|
|||||||
"Gramps will terminate now.")))
|
"Gramps will terminate now.")))
|
||||||
sys.exit(0)
|
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:
|
try:
|
||||||
import cairo
|
import cairo
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
Loading…
Reference in New Issue
Block a user