/[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 1964 by bh, Wed Nov 19 19:48:47 2003 UTC revision 2528 by bernhard, Thu Jan 20 13:14:14 2005 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  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    
28      def __init__(self, parent):      def __init__(self, parent):
# Line 28  class About(wxDialog): Line 34  class About(wxDialog):
34                    | wxRESIZE_BORDER,                    | wxRESIZE_BORDER,
35              size = (400, 250))              size = (400, 250))
36    
37            # Note: The source code is in ASCII, so we escape some
38            # characters to get byte strings in latin1.
39          lead_developer = 'Bernhard Herzog'          lead_developer = 'Bernhard Herzog'
40          developers = [ 'Jonathan Coles', 'Frank Koormann',          developers = [ 'Jonathan Coles',
41                         'Martin M�ller', 'Jan-Oliver Wagner' ]                         'Frank Koormann',
42                           unicodeToLocale(u'Martin M\xfcller'),
43                           'Bernhard Reiter',
44                           'Jan-Oliver Wagner' ]
45          translators = [ ( _('French'), 'Daniel Calvelo Aros' ),          translators = [ ( _('French'), 'Daniel Calvelo Aros' ),
46                          ( _('German'), 'Bj�rn Broscheit'),                          ( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')),
47                            ( _('Hungarian'), 'Norbert Solymosi'),
48                          ( _('Italian'), 'Maurizio Napolitano'),                          ( _('Italian'), 'Maurizio Napolitano'),
49                            ( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'),
50                          ( _('Russian'), 'Alex Shevlakov'),                          ( _('Russian'), 'Alex Shevlakov'),
51                          ( _('Spanish'), 'Daniel Calvelo Aros') ]                          ( _('Spanish'), 'Daniel Calvelo Aros') ]
52          other_contributors = [ 'Jonathan Byron', 'Silke Reimer',          other_contributors = [ 'Jonathan Byron',
53                                 'Bernhard Reiter' ]                                 'Ole Rahn',
54                                   'Silke Reimer' ]
55          dyn_modules = [ ('wxPython', versions['wxPython']),          dyn_modules = [ ('wxPython', versions['wxPython']),
56                          ('Python',   versions['python']),                          ('Python',   versions['python']),
57                          ('PySQLite', versions['pysqlite']),                          ('PySQLite', versions['pysqlite']),
# Line 66  class About(wxDialog): Line 80  class About(wxDialog):
80              text+= '\t%s %s\n' % (name, version)              text+= '\t%s %s\n' % (name, version)
81          text += '\n'          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')          text += _('Lead Developer:\n')
92          text += '\t%s\n\n' % lead_developer          text += '\t%s\n\n' % lead_developer
93    
# Line 86  class About(wxDialog): Line 108  class About(wxDialog):
108    
109          text += \          text += \
110              _("Questions and comments can be sent to the following addresses:\n"              _("Questions and comments can be sent to the following addresses:\n"
111              "\tThuban developers:\n\t\t<[email protected]>\n"              "\tGeneral list (public):\n\t\t<[email protected]>\n"
112              "\tThuban mailing list:\n\t\t<[email protected]>")              "\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    
# Line 123  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        locale=getdefaultlocale()[1]
173        if locale is None:
174            locale = 'ascii'
175        return unicodeStr.encode(locale,'replace')

Legend:
Removed from v.1964  
changed lines
  Added in v.2528

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26