23
from gi.repository import Gtk
26
from bzrlib.plugins.gtk import icon_path
28
class AboutDialog(gtk.AboutDialog):
28
from bzrlib.plugins.gtk import (
35
license_paths = [data_path("COPYING"), "/usr/share/common-licenses/GPL-2"]
36
for license_file in license_paths:
37
if license_file is not None and os.path.exists(license_file):
38
return file(license_file).read()
39
# Fall back to just license name if we can't find the file
40
return "GPLv2 or later"
46
credits = pickle.load(file(data_path("credits.pickle")))
52
class AboutDialog(Gtk.AboutDialog):
29
53
def __init__(self):
30
54
super(AboutDialog, self).__init__()
31
55
self.set_name("Bazaar GTK")
32
56
self.set_version(bzrlib.plugins.gtk.version_string)
33
57
self.set_website("http://bazaar-vcs.org/BzrGtk")
34
self.set_license("GNU GPL v2 or later")
35
self.set_icon(gtk.gdk.pixbuf_new_from_file(icon_path("bzr-icon-64.png")))
58
self.set_license(read_license())
59
self.set_logo(GdkPixbuf.Pixbuf.new_from_file(icon_path("bzr-icon-64.png")))
60
credits = load_credits()
61
if credits is not None:
62
(authors, documenters, artists, translators) = credits
63
self.set_authors(authors)
64
self.set_documenters(documenters)
65
self.set_artists(artists)
66
self.set_translator_credits("\n".join(translators))
36
67
self.connect ("response", lambda d, r: d.destroy())