From bbf495c3b386d7ae11fab3d6fee0e24b50f7d2f1 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Sun, 11 Sep 2005 14:20:20 +0000 Subject: [PATCH] check and do not work if < 2.6 --- src/gajim.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 8ba21f467..7586bc4e9 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -26,15 +26,20 @@ import sys import pygtk import os -if not os.name == 'nt': # py2exe only in windows - pygtk.require('2.0') # py2exe fails on this try: import gtk except RuntimeError, msg: if str(msg) == 'could not open display': print >> sys.stderr, _('Gajim needs Xserver to run. Quiting...') sys.exit() - + +if gtk.pygtk_version < (2, 6, 0): + print >> sys.stderr, _('Gajim needs PyGTK 2.6+ to run. Quiting...') + sys.exit() +elif gtk.gtk_version < (2, 6, 0): + print >> sys.stderr, _('Gajim needs GTK 2.6+ to run. Quiting...') + sys.exit() + import gtkexcepthook import gobject gobject.threads_init()