display more details about OS in about dialogue

This commit is contained in:
Steffen Schaumburg 2011-04-05 04:43:34 +02:00
parent f8fae139be
commit 2d8e611f2d

View File

@ -266,10 +266,15 @@ class fpdb:
'Eric Blade', '_mt', 'sqlcoder', 'Bostik', _('and others')]) 'Eric Blade', '_mt', 'sqlcoder', 'Bostik', _('and others')])
dia.set_program_name("Free Poker Database (FPDB)") dia.set_program_name("Free Poker Database (FPDB)")
db_version = "" if (os.name=="posix"):
#if self.db is not None: os_text=str(os.uname())
# db_version = self.db.get_version() elif (os.name=="nt"):
nums = [(_('Operating System'), os.name), import platform
os_text=("Windows" + " " + str(platform.win32_ver()))
else:
os_text="Unknown"
nums = [(_('Operating System'), os_text),
('Python', sys.version[0:3]), ('Python', sys.version[0:3]),
('GTK+', '.'.join([str(x) for x in gtk.gtk_version])), ('GTK+', '.'.join([str(x) for x in gtk.gtk_version])),
('PyGTK', '.'.join([str(x) for x in gtk.pygtk_version])), ('PyGTK', '.'.join([str(x) for x in gtk.pygtk_version])),
@ -281,7 +286,7 @@ class fpdb:
] ]
versions = gtk.TextBuffer() versions = gtk.TextBuffer()
w = 20 # width used for module names and version numbers w = 20 # width used for module names and version numbers
versions.set_text('\n'.join([x[0].rjust(w) + ' ' + x[1].ljust(w) for x in nums])) versions.set_text('\n'.join([x[0].rjust(w) + ': ' + x[1].ljust(w) for x in nums]))
view = gtk.TextView(versions) view = gtk.TextView(versions)
view.set_editable(False) view.set_editable(False)
view.set_justification(gtk.JUSTIFY_CENTER) view.set_justification(gtk.JUSTIFY_CENTER)