say to the user what is wrong (if missing libglade)
This commit is contained in:
parent
49cef57a9d
commit
091211434e
18
src/gajim.py
18
src/gajim.py
|
@ -44,6 +44,24 @@ elif gtk.gtk_version < (2, 6, 0):
|
||||||
print >> sys.stderr, _('Gajim needs GTK 2.6+ to run. Quiting...')
|
print >> sys.stderr, _('Gajim needs GTK 2.6+ to run. Quiting...')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
try:
|
||||||
|
import gtk.glade # check if user has libglade (in pygtk and in gtk)
|
||||||
|
except ImportError:
|
||||||
|
pritext = _('GTK+ runtime is missing libglade support')
|
||||||
|
if os.name == 'nt':
|
||||||
|
sectext = _('Please download remove your current GTK+ runtime and install the latest stable version from %s') % 'http://gladewin32.sourceforge.net'
|
||||||
|
else:
|
||||||
|
sectext = _('Please make sure that gtk and pygtk have libglade support in your system.')
|
||||||
|
|
||||||
|
dlg = gtk.MessageDialog(None,
|
||||||
|
gtk.DIALOG_DESTROY_WITH_PARENT | gtk.DIALOG_MODAL,
|
||||||
|
gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, message_format = pritext)
|
||||||
|
|
||||||
|
dlg.format_secondary_text(sectext)
|
||||||
|
dlg.run()
|
||||||
|
dlg.destroy()
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
import gtkexcepthook
|
import gtkexcepthook
|
||||||
import gobject
|
import gobject
|
||||||
if sys.version[:4] >= '2.4':
|
if sys.version[:4] >= '2.4':
|
||||||
|
|
Loading…
Reference in New Issue