Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

about: do not wrap license, other minor improvements

Changeset 213fadac160f

Parent 7dfa627229c2

by Steve Borho

Changes to one file · Browse files at 213fadac160f Showing diff from parent 7dfa627229c2 Diff from another changeset...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
 
 
 
 
65
66
67
68
69
70
71
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 
 
63
64
65
66
67
68
69
70
71
72
73
 # about.py - TortoiseHg About dialog  #  # Copyright 2007 TK Soh <teekaysoh@gmail.com>  # Copyright 2007 Steve Borho <steve@borho.org>  #  # This software may be used and distributed according to the terms of the  # GNU General Public License version 2, incorporated herein by reference.    import os  import sys  import gtk    from tortoisehg.util.i18n import _  from tortoisehg.util import version, paths, hglib, shlib    from tortoisehg.hgtk import gtklib, hgtk    def url_handler(dialog, link, user_data):   shlib.browse_url(link)    gtk.about_dialog_set_url_hook(url_handler, None)    def make_version(tuple):   vers = ".".join([str(x) for x in tuple])   return vers    class AboutDialog(gtk.AboutDialog):   def __init__(self):   super(AboutDialog, self).__init__()   gtklib.set_tortoise_keys(self)     lib_versions = ', '.join([   "Mercurial-%s" % hglib.hgversion,   "Python-%s" % make_version(sys.version_info[0:3]),   "PyGTK-%s" % make_version(gtk.pygtk_version),   "GTK-%s" % make_version(gtk.gtk_version),   ])     comment = _("Several icons are courtesy of the TortoiseSVN project")     self.set_website("http://tortoisehg.org")   self.set_name("TortoiseHg")   self.set_version(_("(version %s)") % version.version())   if hasattr(self, 'set_wrap_license'): - self.set_wrap_license(True) + self.set_wrap_license(False)   self.set_copyright(_("Copyright 2009 Steve Borho and others"))     thg_logo = paths.get_tortoise_icon('thg_logo_92x50.png')   thg_icon = paths.get_tortoise_icon('thg_logo.ico')   try:   license_file = paths.get_license_path()   if license_file.endswith('.gz'):   import gzip   lic = gzip.open(license_file, 'rb').read()   else:   lic = open(license_file, 'rb').read()   self.set_license(lic)   except (ImportError, IOError):   license = hgtk.shortlicense.splitlines()[1:]   self.set_license('\n'.join(license))     self.set_comments(_("with %s") % lib_versions + "\n\n" + comment) - self.set_logo(gtk.gdk.pixbuf_new_from_file(thg_logo)) - self.set_icon_from_file(thg_icon) + if thg_logo: + self.set_logo(gtk.gdk.pixbuf_new_from_file(thg_logo)) + if thg_icon: + self.set_icon_from_file(thg_icon)   self.connect('response', self.response)     def response(self, widget, respid):   self.destroy()    def run(_ui, *pats, **opts):   return AboutDialog()