/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/about.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/about.py

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

revision 1305 by jonathan, Thu Jun 26 16:59:41 2003 UTC revision 2725 by bernhard, Tue Feb 20 10:36:20 2007 UTC
# Line 1  Line 1 
1  # Copyright (c) 2001, 2002, 2003 by Intevation GmbH  # Copyright (c) 2001-2007 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.
9    
10  from wxPython.wx import *  """The About Box"""
 #from wxPython.wx import __version__ as wxPython_version  
11    
12  from Thuban import _  __version__ = "$Revision$"
13  #import Thuban.version  # $Source$
14  from Thuban.version import versions  # $Id$
   
 #from sqlite import version as pysqlite_version  
 #from _sqlite import sqlite_version  
15    
16  #from wxproj import get_proj_version, get_gtk_version  import wx
17    
18  #from  Thuban.Model.resource import has_gdal_support  from Thuban import _, internal_from_unicode, get_internal_encoding
19    from Thuban.version import versions
20    from Thuban.Model.resource import gdal_support_status
21    
22  #if has_gdal_support():  from Thuban.UI.extensionregistry import ext_registry
 #    from gdalwarp import get_gdal_version  
23    
24  class About(wxDialog):  class About(wx.Dialog):
25    
26      def __init__(self, parent):      def __init__(self, parent):
27          wxDialog.__init__(self, parent, -1, _("About Thuban"),          wx.Dialog.__init__(self, parent, -1, _("About Thuban"),
28              style = wxDEFAULT_DIALOG_STYLE              style = wx.DEFAULT_DIALOG_STYLE
29                    | wxSYSTEM_MENU                    | wx.SYSTEM_MENU
30                    | wxMINIMIZE_BOX                    | wx.MINIMIZE_BOX
31                    | wxMAXIMIZE_BOX                    | wx.MAXIMIZE_BOX
32                    | wxRESIZE_BORDER,                    | wx.RESIZE_BORDER,
33              size = (400, 250))              size = (400, 250))
34    
35          #proj_ver = get_proj_version()          # Note: The source code is in ASCII, so we escape some
36          #if proj_ver:          # characters to get byte strings in latin1.
37              #proj_ver = "%d.%d.%d" % proj_ver          maintainers = [ 'Bernhard Reiter (2006 - current)',
38          #else:                          'Bernhard Herzog (2001 - 2005)' ]
39              #proj_ver = " - not available"          lead_developer = 'Bernhard Herzog (2001 - 2005)'
40            developers = [ 'Jonathan Coles (2003, 2005)',
41          #gtk_ver = get_gtk_version()                         'Frank Koormann (2002 - )',
42          #if gtk_ver:                         internal_from_unicode(u'Martin M\xfcller (2003)'),
43              #gtk_ver = "%d.%d.%d" % gtk_ver                         'Didrik Pinte (2006 - )',
44          #else:                         'Bernhard Reiter (2004 - )',
45              #gtk_ver = " - not available"                         'Jan-Oliver Wagner (2002 - 2005)' ]
46            translators = [ ( _('French'), 'Daniel Calvelo Aros' ),
47          text = _(#"Build Date: %s\n"                          ( _('German'),
48              "%s\n\n"                            internal_from_unicode(u'Bj\xf6rn Broscheit')),
49              "Currently using:\n"                          ( _('Hungarian'), 'Norbert Solymosi'),
50              "\t%s\n"                          ( _('Italian'), 'Maurizio Napolitano'),
51              "\t%s\n"                          ( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'),
52              "\t%s\n"                          ( _('Russian'), 'Alex Shevlakov'),
53              "\t%s\n"                          ( _('Spanish'), 'Daniel Calvelo Aros') ]
54              "\t%s\n\n"          other_contributors = [ 'Jonathan Byron (2004)',
55              "Compiled against:\n"                                 'Ole Rahn (2004)',
56              "\t%s\n"                                 'Silke Reimer (2003, 2004)',
57              "\t%s\n\n"                                 'Martin "Joey" Schulze (2004, 2005)' ]
58              "Lead Developer:\n"          dyn_modules = [ ('wxPython', versions['wxPython']),
59              "\tBernhard Herzog <[email protected]>\n\n"                          ('Python',   versions['python']),
60              "Developers:\n"                          ('PySQLite', versions['pysqlite']),
61              "\tJonathan Coles\n"                          ('SQLite',  versions['sqlite']),
62              "\tFrank Koormann\n"                          ('GDAL', versions.get('gdal', _('- not available'))),
63              "\tBernhard Reiter\n"                          ('psycopg', versions.get('psycopg',
64              "\tJan-Oliver Wagner\n\n"                                                   _('- not available')))]
65              "Contributors:\n"          direct_modules = [ \
66              "\tJonathan Byron\n"                  ('GTK',      versions.get('gtk', _('- not available'))),
67              "\tMartin M�ller"                  ('proj',     versions['proj']) ]
68              % ("Thuban %s"      % versions['thuban-long'],  
69                 "wxPython %s"    % versions['wxPython'],          text = 'Thuban %s\n\n' % versions['thuban-long']
70                 "Python %s"      % versions['python'],  
71                 "PySQLite %s"    % versions['pysqlite'],          text += _('Currently using:\n')
72                 "SQLite %s"      % versions['sqlite'],  
73                 "GDAL %s"        % versions.get('gdal', " - not available"),          for name, version in dyn_modules:
74                 "GTK %s"         % versions.get('gtk', " - not available"),              text+= '\t%s %s\n' % (name, version)
75                 "proj %s"        % versions['proj']))          text += '\n'
76    
77            text += _('\tInternal encoding: %s\n') % get_internal_encoding()
78            text += '\n'
79    
80            if gdal_support_status:
81                text += gdal_support_status + "\n\n"
82    
83            text += _('Compiled for:\n')
84    
85            for name, version in direct_modules:
86                text+= '\t%s %s\n' % (name, version)
87            text += '\n'
88    
89            text += _('Extensions:\n')
90            if ext_registry:
91                for ext in ext_registry:
92                    text += '\t%s %s\n' % (ext.name, ext.version)
93            else:
94                text += _('\tNone registered.\n')
95            text += '\n'
96    
97            text += _('Maintainers:\n')
98            for name in maintainers:
99                text += '\t%s\n' % name
100            text += '\n'
101    
102            text += _('Lead Developer:\n')
103            text += '\t%s\n\n' % lead_developer
104    
105            text += _('Developers:\n')
106            for name in developers:
107                text += '\t%s\n' % name
108            text += '\n'
109    
110            text += _('Translators:\n')
111            for lang, name in translators:
112                text += '\t%s: %s\n' % (lang, name)
113            text += '\n'
114    
115            text += _('Other Contributors:\n')
116            for name in other_contributors:
117                text += '\t%s\n' % name
118            text += '\n'
119    
120            text += \
121                _("Questions and comments can be sent to the following addresses:\n"
122                "\tGeneral list (public):\n\t\t<[email protected]>\n"
123                "\tDevelopers list (public):\n\t\t<[email protected]>\n"
124                "\tThuban team at Intevation:\n\t\t<[email protected]>\n"
125                )
126    
127            text += '\n\n'
128    
129            text += _("Details on the registered extensions:\n\n")
130    
131            if ext_registry:
132                for ext in ext_registry:
133                    text += '%s %s:\n' % (ext.name, ext.version)
134                    text += _('Copyright %s\n') % ext.copyright
135                    text += _('Authors:\n')
136                    for author in ext.authors:
137                        text+= '\t%s\n' % author
138                    text += ext.desc
139                    text += '\n'
140                    text += 'Status: %s' % ext.status
141                    text += '\n\n'
142            else:
143                text += _('\tNone registered.\n')
144    
145          self.text = text          self.text = text
146    
147          text_title = wxStaticText(self, -1,          text_title = wx.StaticText(self, -1,
148              "Thuban is a program for exploring geographic data.\n\n"              _("Thuban is a program for exploring geographic data.\n\n") +
149              "Copyright 2001-2003 Intevation GmbH.\n"              "Copyright 2001-2007 Intevation GmbH.\n" +
150              "Thuban is licensed under the GNU GPL",              _("Thuban is licensed under the GNU GPL"),
151                                    style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE)                                    style=wx.ST_NO_AUTORESIZE|wx.ALIGN_CENTRE)
152    
153          textBox = wxTextCtrl(self, -1, text,          textBox = wx.TextCtrl(self, -1, text,
154              style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP)              style=wx.TE_READONLY|wx.TE_MULTILINE|wx.TE_LINEWRAP)
155          w, h = (300, 150)          w, h = (300, 150)
156          textBox.SetSizeHints(w, h)          textBox.SetSizeHints(w, h)
157          textBox.SetSize((w, h))          textBox.SetSize((w, h))
158    
159          button_close = wxButton(self, wxID_CANCEL, _("Close"))          button_close = wx.Button(self, wx.ID_CANCEL, _("Close"))
160          button_close.SetDefault()          button_close.SetDefault()
161    
162          sizer = wxBoxSizer(wxVERTICAL)          sizer = wx.BoxSizer(wx.VERTICAL)
163          sizer.Add(text_title, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 10)          sizer.Add(text_title, 0, wx.ALL|wx.EXPAND|wx.ADJUST_MINSIZE, 10)
164          sizer.Add(textBox, 1, wxALL|wxEXPAND, 10)          sizer.Add(textBox, 1, wx.ALL|wx.EXPAND, 10)
165          sizer.Add(button_close, 0, wxALL|wxALIGN_RIGHT, 10)          sizer.Add(button_close, 0, wx.ALL|wx.ALIGN_RIGHT, 10)
166    
167          self.SetAutoLayout(True)          self.SetAutoLayout(True)
168          self.SetSizer(sizer)          self.SetSizer(sizer)
# Line 103  class About(wxDialog): Line 170  class About(wxDialog):
170          sizer.SetSizeHints(self)          sizer.SetSizeHints(self)
171          self.Layout()          self.Layout()
172    
173          EVT_BUTTON(self, wxID_CANCEL, self.OnCancel)          self.Bind(wx.EVT_BUTTON, self.OnCancel, id=wx.ID_CANCEL)
174    
175      def OnCancel(self, event):      def OnCancel(self, event):
176          self.EndModal(wxID_CANCEL)          self.EndModal(wx.ID_CANCEL)
   
   

Legend:
Removed from v.1305  
changed lines
  Added in v.2725

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26