Add GTK+ version check on start

This commit is contained in:
Philipp Hörist 2017-12-16 23:20:37 +01:00
parent 9e771add7e
commit ba54c304e8
1 changed files with 9 additions and 0 deletions

View File

@ -54,6 +54,7 @@ from gajim.common import logging_helpers
from gajim.common import crypto
MIN_NBXMPP_VER = "0.6.1"
MIN_GTK_VER = "3.20.0"
class GajimApplication(Gtk.Application):
@ -121,6 +122,14 @@ class GajimApplication(Gtk.Application):
'Quitting...' % MIN_NBXMPP_VER)
sys.exit(1)
gtk_ver = '%s.%s.%s' % (Gtk.get_major_version(),
Gtk.get_minor_version(),
Gtk.get_micro_version())
if V(gtk_ver) < V(MIN_GTK_VER):
print('Gajim needs GTK+ >= %s to run. '
'Quitting...' % MIN_GTK_VER)
sys.exit(1)
# Create and initialize Application Paths & Databases
from gajim.common import configpaths
configpaths.gajimpaths.init(