/[thuban]/branches/thuban-1-0-branch/thuban/Thuban/UI/about.py
ViewVC logotype

Annotation of /branches/thuban-1-0-branch/thuban/Thuban/UI/about.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1980 - (hide annotations)
Tue Nov 25 15:59:18 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/about.py
File MIME type: text/x-python
File size: 4362 byte(s)
(About.__init__): Make sure we have ASCII
source code.

1 jonathan 1305 # Copyright (c) 2001, 2002, 2003 by Intevation GmbH
2     # Authors:
3     # Jonathan Coles <[email protected]>
4     #
5     # This program is free software under the GPL (>=v2)
6     # Read the file COPYING coming with Thuban for details.
7    
8 bh 1542 """The About Box"""
9    
10     __version__ = "$Revision$"
11     # $Source$
12     # $Id$
13    
14 jonathan 1305 from wxPython.wx import *
15    
16     from Thuban import _
17     from Thuban.version import versions
18 bh 1964 from Thuban.Model.resource import gdal_support_status
19 jonathan 1305
20     class About(wxDialog):
21    
22     def __init__(self, parent):
23     wxDialog.__init__(self, parent, -1, _("About Thuban"),
24     style = wxDEFAULT_DIALOG_STYLE
25     | wxSYSTEM_MENU
26     | wxMINIMIZE_BOX
27     | wxMAXIMIZE_BOX
28     | wxRESIZE_BORDER,
29     size = (400, 250))
30    
31 bh 1980 # Note: The source code is in ASCII, so we escape some
32     # characters to get byte strings in latin1.
33 jan 1628 lead_developer = 'Bernhard Herzog'
34     developers = [ 'Jonathan Coles', 'Frank Koormann',
35 bh 1980 'Martin M\xfcller', 'Jan-Oliver Wagner' ]
36 jan 1628 translators = [ ( _('French'), 'Daniel Calvelo Aros' ),
37 bh 1980 ( _('German'), 'Bj\xf6rn Broscheit'),
38 jan 1628 ( _('Italian'), 'Maurizio Napolitano'),
39     ( _('Russian'), 'Alex Shevlakov'),
40     ( _('Spanish'), 'Daniel Calvelo Aros') ]
41     other_contributors = [ 'Jonathan Byron', 'Silke Reimer',
42     'Bernhard Reiter' ]
43     dyn_modules = [ ('wxPython', versions['wxPython']),
44     ('Python', versions['python']),
45     ('PySQLite', versions['pysqlite']),
46     ('SQLite', versions['sqlite']),
47 bh 1631 ('GDAL', versions.get('gdal', _('- not available'))),
48     ('psycopg', versions.get('psycopg',
49     _('- not available')))]
50 jan 1628 direct_modules = [ \
51     ('GTK', versions.get('gtk', _('- not available'))),
52     ('proj', versions['proj']) ]
53    
54     text = 'Thuban %s\n\n' % versions['thuban-long']
55    
56     text += _('Currently using:\n')
57    
58     for name, version in dyn_modules:
59     text+= '\t%s %s\n' % (name, version)
60     text += '\n'
61    
62 bh 1964 if gdal_support_status:
63     text += gdal_support_status + "\n\n"
64    
65 jan 1628 text += _('Compiled for:\n')
66    
67     for name, version in direct_modules:
68     text+= '\t%s %s\n' % (name, version)
69     text += '\n'
70    
71     text += _('Lead Developer:\n')
72     text += '\t%s\n\n' % lead_developer
73    
74     text += _('Developers:\n')
75     for name in developers:
76     text += '\t%s\n' % name
77     text += '\n'
78    
79     text += _('Translators:\n')
80     for lang, name in translators:
81     text += '\t%s: %s\n' % (lang, name)
82     text += '\n'
83    
84     text += _('Other Contributors:\n')
85     for name in other_contributors:
86     text += '\t%s\n' % name
87     text += '\n'
88    
89     text += \
90     _("Questions and comments can be sent to the following addresses:\n"
91 jonathan 1323 "\tThuban developers:\n\t\t<[email protected]>\n"
92 jan 1628 "\tThuban mailing list:\n\t\t<[email protected]>")
93 jonathan 1305
94     self.text = text
95    
96     text_title = wxStaticText(self, -1,
97 jan 1628 _("Thuban is a program for exploring geographic data.\n\n") +
98     "Copyright 2001-2003 Intevation GmbH.\n" +
99     _("Thuban is licensed under the GNU GPL"),
100 jonathan 1305 style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE)
101    
102     textBox = wxTextCtrl(self, -1, text,
103     style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP)
104     w, h = (300, 150)
105     textBox.SetSizeHints(w, h)
106     textBox.SetSize((w, h))
107    
108     button_close = wxButton(self, wxID_CANCEL, _("Close"))
109     button_close.SetDefault()
110    
111     sizer = wxBoxSizer(wxVERTICAL)
112     sizer.Add(text_title, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 10)
113     sizer.Add(textBox, 1, wxALL|wxEXPAND, 10)
114     sizer.Add(button_close, 0, wxALL|wxALIGN_RIGHT, 10)
115    
116     self.SetAutoLayout(True)
117     self.SetSizer(sizer)
118     sizer.Fit(self)
119     sizer.SetSizeHints(self)
120     self.Layout()
121    
122     EVT_BUTTON(self, wxID_CANCEL, self.OnCancel)
123    
124     def OnCancel(self, event):
125     self.EndModal(wxID_CANCEL)
126    
127    

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26