/[thuban]/trunk/thuban/Thuban/UI/about.py
ViewVC logotype

Diff of /trunk/thuban/Thuban/UI/about.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1568 by jan, Fri Aug 8 13:33:03 2003 UTC revision 2478 by bh, Fri Dec 17 18:48:49 2004 UTC
# Line 1  Line 1 
1  # Copyright (c) 2001, 2002, 2003 by Intevation GmbH  # Copyright (c) 2001, 2002, 2003, 2004 by Intevation GmbH
2  # Authors:  # Authors:
3  # Jonathan Coles <[email protected]>  # Jonathan Coles <[email protected]>
4    # Bernhard Reiter <[email protected]>
5    # Silke Reimer <[email protected]>
6  #  #
7  # This program is free software under the GPL (>=v2)  # This program is free software under the GPL (>=v2)
8  # Read the file COPYING coming with Thuban for details.  # Read the file COPYING coming with Thuban for details.
# Line 13  __version__ = "$Revision$" Line 15  __version__ = "$Revision$"
15    
16  from wxPython.wx import *  from wxPython.wx import *
17    
18    from locale import getdefaultlocale
19    
20  from Thuban import _  from Thuban import _
21  from Thuban.version import versions  from Thuban.version import versions
22    from Thuban.Model.resource import gdal_support_status
23    
24    from Thuban.UI.extensionregistry import ext_registry
25    
26  class About(wxDialog):  class About(wxDialog):
27    
# Line 27  class About(wxDialog): Line 34  class About(wxDialog):
34                    | wxRESIZE_BORDER,                    | wxRESIZE_BORDER,
35              size = (400, 250))              size = (400, 250))
36    
37          text = _(#"Build Date: %s\n"          # Note: The source code is in ASCII, so we escape some
38              "%s\n\n"          # characters to get byte strings in latin1.
39              "Currently using:\n"          lead_developer = 'Bernhard Herzog'
40              "\t%s\n"          developers = [ 'Jonathan Coles',
41              "\t%s\n"                         'Frank Koormann',
42              "\t%s\n"                         unicodeToLocale(u'Martin M\xfcller'),
43              "\t%s\n"                         'Bernhard Reiter',
44              "\t%s\n\n"                         'Jan-Oliver Wagner' ]
45              "Compiled against:\n"          translators = [ ( _('French'), 'Daniel Calvelo Aros' ),
46              "\t%s\n"                          ( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')),
47              "\t%s\n\n"                          ( _('Hungarian'), 'Norbert Solymosi'),
48              "Lead Developer:\n"                          ( _('Italian'), 'Maurizio Napolitano'),
49              "\tBernhard Herzog\n\n"                          ( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'),
50              "Developers:\n"                          ( _('Russian'), 'Alex Shevlakov'),
51              "\tJonathan Coles\n"                          ( _('Spanish'), 'Daniel Calvelo Aros') ]
52              "\tFrank Koormann\n"          other_contributors = [ 'Jonathan Byron',
53              "\tMartin M�ller\n"                                 'Ole Rahn',
54              "\tJan-Oliver Wagner\n\n"                                 'Silke Reimer' ]
55              "Translators:\n"          dyn_modules = [ ('wxPython', versions['wxPython']),
56              "\tFrench: Daniel Calvelo Aros\n"                          ('Python',   versions['python']),
57              "\tItalian: Maurizio Napolitano\n"                          ('PySQLite', versions['pysqlite']),
58              "\tRussian: Alex Shevlakov\n"                          ('SQLite',  versions['sqlite']),
59              "\tSpanish: Daniel Calvelo Aros\n\n"                          ('GDAL', versions.get('gdal', _('- not available'))),
60              "Other Contributors:\n"                          ('psycopg', versions.get('psycopg',
61              "\tJonathan Byron\n"                                                   _('- not available')))]
62              "\tBernhard Reiter\n\n"          direct_modules = [ \
63              "Questions and comments can be sent to the following addresses:\n"                  ('GTK',      versions.get('gtk', _('- not available'))),
64              "\tThuban developers:\n\t\t<[email protected]>\n"                  ('proj',     versions['proj']) ]
65              "\tThuban mailing list:\n\t\t<[email protected]>"  
66              % ("Thuban %s"      % versions['thuban-long'],          text = 'Thuban %s\n\n' % versions['thuban-long']
67                 "wxPython %s"    % versions['wxPython'],  
68                 "Python %s"      % versions['python'],          text += _('Currently using:\n')
69                 "PySQLite %s"    % versions['pysqlite'],  
70                 "SQLite %s"      % versions['sqlite'],          for name, version in dyn_modules:
71                 "GDAL %s"        % versions.get('gdal', "- not available"),              text+= '\t%s %s\n' % (name, version)
72                 "GTK %s"         % versions.get('gtk', "- not available"),          text += '\n'
73                 "proj %s"        % versions['proj']))  
74            if gdal_support_status:
75                text += gdal_support_status + "\n\n"
76    
77            text += _('Compiled for:\n')
78    
79            for name, version in direct_modules:
80                text+= '\t%s %s\n' % (name, version)
81            text += '\n'
82    
83            text += _('Extensions:\n')
84            if ext_registry:
85                for ext in ext_registry:
86                    text += '\t%s %s\n' % (ext.name, ext.version)
87            else:
88                text += _('\tNone registered.\n')
89            text += '\n'
90    
91            text += _('Lead Developer:\n')
92            text += '\t%s\n\n' % lead_developer
93    
94            text += _('Developers:\n')
95            for name in developers:
96                text += '\t%s\n' % name
97            text += '\n'
98    
99            text += _('Translators:\n')
100            for lang, name in translators:
101                text += '\t%s: %s\n' % (lang, name)
102            text += '\n'
103    
104            text += _('Other Contributors:\n')
105            for name in other_contributors:
106                text += '\t%s\n' % name
107            text += '\n'
108    
109            text += \
110                _("Questions and comments can be sent to the following addresses:\n"
111                "\tGeneral list (public):\n\t\t<[email protected]>\n"
112                "\tDevelopers list (public):\n\t\t<[email protected]>\n"
113                "\tThuban team at Intevation:\n\t\t<[email protected]>\n"
114                )
115    
116            text += '\n\n'
117    
118            text += _("Details on the registered extensions:\n\n")
119    
120            if ext_registry:
121                for ext in ext_registry:
122                    text += '%s %s:\n' % (ext.name, ext.version)
123                    text += _('Copyright %s\n') % ext.copyright
124                    text += _('Authors:\n')
125                    for author in ext.authors:
126                        text+= '\t%s\n' % author
127                    text += ext.desc
128                    text += '\n\n'
129            else:
130                text += _('\tNone registered.\n')
131    
132          self.text = text          self.text = text
133    
134          text_title = wxStaticText(self, -1,          text_title = wxStaticText(self, -1,
135              "Thuban is a program for exploring geographic data.\n\n"              _("Thuban is a program for exploring geographic data.\n\n") +
136              "Copyright 2001-2003 Intevation GmbH.\n"              "Copyright 2001-2004 Intevation GmbH.\n" +
137              "Thuban is licensed under the GNU GPL",              _("Thuban is licensed under the GNU GPL"),
138                                    style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE)                                    style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE)
139    
140          textBox = wxTextCtrl(self, -1, text,          textBox = wxTextCtrl(self, -1, text,
# Line 99  class About(wxDialog): Line 163  class About(wxDialog):
163          self.EndModal(wxID_CANCEL)          self.EndModal(wxID_CANCEL)
164    
165    
166    def unicodeToLocale(unicodeStr):
167        "Function to convert unicode to the user's locale encoding"
168        # Under a german windows 2000 getlocale returns an encoding name
169        # that's not direcly usable (it's missing a "cp" at the beginning).
170        # getdefaultlocale does return a usable encoding name so we use that
171        # instead.
172        return unicodeStr.encode(getdefaultlocale()[1])

Legend:
Removed from v.1568  
changed lines
  Added in v.2478

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26