Rev 512: Show full license details in about dialog. in file:///data/jelmer/bzr-gtk/trunk/

Jelmer Vernooij jelmer at samba.org
Sat Jun 28 18:13:47 BST 2008


At file:///data/jelmer/bzr-gtk/trunk/

------------------------------------------------------------
revno: 512
revision-id: jelmer at samba.org-20080628171346-ob42iggcc663s4xz
parent: jelmer at samba.org-20080628154539-l5lkvs5qwuf2zx1m
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-06-28 19:13:46 +0200
message:
  Show full license details in about dialog.
modified:
  about.py                       about.py-20070715145104-2ihlkw9xgrwj7i3d-1
=== modified file 'about.py'
--- a/about.py	2008-04-01 09:59:41 +0000
+++ b/about.py	2008-06-28 17:13:46 +0000
@@ -25,13 +25,23 @@
 import os
 from bzrlib.plugins.gtk import icon_path
 
+
+def read_license():
+    license_file = os.path.join(os.path.dirname(__file__), "COPYING")
+    if os.path.exists(license_file):
+        return file(license_file).read()
+    # Fall back to just license name if we can't find the file
+    return "GPLv2 or later"
+
+
 class AboutDialog(gtk.AboutDialog):
     def __init__(self):
         super(AboutDialog, self).__init__()
         self.set_name("Bazaar GTK")
         self.set_version(bzrlib.plugins.gtk.version_string)
         self.set_website("http://bazaar-vcs.org/BzrGtk")
-        self.set_license("GNU GPL v2 or later")
-        self.set_icon(gtk.gdk.pixbuf_new_from_file(icon_path("bzr-icon-64.png")))
+        self.set_license(read_license())
+        self.set_logo(gtk.gdk.pixbuf_new_from_file(icon_path("bzr-icon-64.png")))
         self.connect ("response", lambda d, r: d.destroy())
 
+




More information about the bazaar-commits mailing list