print gtk and pygtk version in about dialog

This commit is contained in:
Yann Leboulanger 2006-04-12 16:31:35 +00:00
parent 62cf30d06e
commit a5ce1a1503
1 changed files with 9 additions and 1 deletions

View File

@ -525,7 +525,9 @@ class AboutDialog:
text = open('../COPYING').read() text = open('../COPYING').read()
dlg.set_license(text) dlg.set_license(text)
dlg.set_comments(_('A GTK+ jabber client')) dlg.set_comments(_('A GTK+ jabber client') + '\nGTK+ Version: ' + \
self.tuple2str(gtk.gtk_version) + '\nPyGTK Version: ' + \
self.tuple2str(gtk.pygtk_version))
dlg.set_website('http://www.gajim.org') dlg.set_website('http://www.gajim.org')
authors = [ authors = [
@ -568,6 +570,12 @@ class AboutDialog:
rep = dlg.run() rep = dlg.run()
dlg.destroy() dlg.destroy()
def tuple2str(self, tuple):
str_ = ''
for num in tuple:
str_ += str(num) + '.'
return str_[0:-1] # remove latest .
class Dialog(gtk.Dialog): class Dialog(gtk.Dialog):
def __init__(self, parent, title, buttons, default = None): def __init__(self, parent, title, buttons, default = None):
gtk.Dialog.__init__(self, title, parent, gtk.DIALOG_DESTROY_WITH_PARENT | gtk.DIALOG_MODAL | gtk.DIALOG_NO_SEPARATOR) gtk.Dialog.__init__(self, title, parent, gtk.DIALOG_DESTROY_WITH_PARENT | gtk.DIALOG_MODAL | gtk.DIALOG_NO_SEPARATOR)