1 |
jan |
2582 |
# Copyright (c) 2001-2005 by Intevation GmbH |
2 |
jonathan |
1305 |
# Authors: |
3 |
|
|
# Jonathan Coles <[email protected]> |
4 |
bernhard |
2140 |
# Bernhard Reiter <[email protected]> |
5 |
silke |
2338 |
# Silke Reimer <[email protected]> |
6 |
jonathan |
1305 |
# |
7 |
|
|
# This program is free software under the GPL (>=v2) |
8 |
|
|
# Read the file COPYING coming with Thuban for details. |
9 |
|
|
|
10 |
bh |
1542 |
"""The About Box""" |
11 |
|
|
|
12 |
|
|
__version__ = "$Revision$" |
13 |
|
|
# $Source$ |
14 |
|
|
# $Id$ |
15 |
|
|
|
16 |
jonathan |
1305 |
from wxPython.wx import * |
17 |
|
|
|
18 |
bernhard |
2674 |
from Thuban import _, internal_from_unicode, get_internal_encoding |
19 |
jonathan |
1305 |
from Thuban.version import versions |
20 |
bh |
1964 |
from Thuban.Model.resource import gdal_support_status |
21 |
jonathan |
1305 |
|
22 |
jan |
2354 |
from Thuban.UI.extensionregistry import ext_registry |
23 |
|
|
|
24 |
jonathan |
1305 |
class About(wxDialog): |
25 |
|
|
|
26 |
|
|
def __init__(self, parent): |
27 |
|
|
wxDialog.__init__(self, parent, -1, _("About Thuban"), |
28 |
|
|
style = wxDEFAULT_DIALOG_STYLE |
29 |
|
|
| wxSYSTEM_MENU |
30 |
|
|
| wxMINIMIZE_BOX |
31 |
|
|
| wxMAXIMIZE_BOX |
32 |
|
|
| wxRESIZE_BORDER, |
33 |
|
|
size = (400, 250)) |
34 |
|
|
|
35 |
bh |
1980 |
# Note: The source code is in ASCII, so we escape some |
36 |
|
|
# characters to get byte strings in latin1. |
37 |
jan |
1628 |
lead_developer = 'Bernhard Herzog' |
38 |
jan |
2428 |
developers = [ 'Jonathan Coles', |
39 |
|
|
'Frank Koormann', |
40 |
bh |
2642 |
internal_from_unicode(u'Martin M\xfcller'), |
41 |
jan |
2428 |
'Bernhard Reiter', |
42 |
|
|
'Jan-Oliver Wagner' ] |
43 |
jan |
1628 |
translators = [ ( _('French'), 'Daniel Calvelo Aros' ), |
44 |
bh |
2642 |
( _('German'), |
45 |
|
|
internal_from_unicode(u'Bj\xf6rn Broscheit')), |
46 |
jan |
2428 |
( _('Hungarian'), 'Norbert Solymosi'), |
47 |
jan |
1628 |
( _('Italian'), 'Maurizio Napolitano'), |
48 |
frank |
2053 |
( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'), |
49 |
jan |
1628 |
( _('Russian'), 'Alex Shevlakov'), |
50 |
|
|
( _('Spanish'), 'Daniel Calvelo Aros') ] |
51 |
jan |
2428 |
other_contributors = [ 'Jonathan Byron', |
52 |
|
|
'Ole Rahn', |
53 |
|
|
'Silke Reimer' ] |
54 |
jan |
1628 |
dyn_modules = [ ('wxPython', versions['wxPython']), |
55 |
|
|
('Python', versions['python']), |
56 |
|
|
('PySQLite', versions['pysqlite']), |
57 |
|
|
('SQLite', versions['sqlite']), |
58 |
bh |
1631 |
('GDAL', versions.get('gdal', _('- not available'))), |
59 |
|
|
('psycopg', versions.get('psycopg', |
60 |
|
|
_('- not available')))] |
61 |
jan |
1628 |
direct_modules = [ \ |
62 |
|
|
('GTK', versions.get('gtk', _('- not available'))), |
63 |
|
|
('proj', versions['proj']) ] |
64 |
|
|
|
65 |
|
|
text = 'Thuban %s\n\n' % versions['thuban-long'] |
66 |
|
|
|
67 |
|
|
text += _('Currently using:\n') |
68 |
|
|
|
69 |
|
|
for name, version in dyn_modules: |
70 |
|
|
text+= '\t%s %s\n' % (name, version) |
71 |
|
|
text += '\n' |
72 |
|
|
|
73 |
bernhard |
2674 |
text += _('\tInternal encoding: %s\n') % get_internal_encoding() |
74 |
|
|
text += '\n' |
75 |
|
|
|
76 |
bh |
1964 |
if gdal_support_status: |
77 |
|
|
text += gdal_support_status + "\n\n" |
78 |
|
|
|
79 |
jan |
1628 |
text += _('Compiled for:\n') |
80 |
|
|
|
81 |
|
|
for name, version in direct_modules: |
82 |
|
|
text+= '\t%s %s\n' % (name, version) |
83 |
|
|
text += '\n' |
84 |
|
|
|
85 |
jan |
2354 |
text += _('Extensions:\n') |
86 |
|
|
if ext_registry: |
87 |
|
|
for ext in ext_registry: |
88 |
|
|
text += '\t%s %s\n' % (ext.name, ext.version) |
89 |
|
|
else: |
90 |
|
|
text += _('\tNone registered.\n') |
91 |
|
|
text += '\n' |
92 |
|
|
|
93 |
jan |
1628 |
text += _('Lead Developer:\n') |
94 |
|
|
text += '\t%s\n\n' % lead_developer |
95 |
|
|
|
96 |
|
|
text += _('Developers:\n') |
97 |
|
|
for name in developers: |
98 |
|
|
text += '\t%s\n' % name |
99 |
|
|
text += '\n' |
100 |
|
|
|
101 |
|
|
text += _('Translators:\n') |
102 |
|
|
for lang, name in translators: |
103 |
|
|
text += '\t%s: %s\n' % (lang, name) |
104 |
|
|
text += '\n' |
105 |
|
|
|
106 |
|
|
text += _('Other Contributors:\n') |
107 |
|
|
for name in other_contributors: |
108 |
|
|
text += '\t%s\n' % name |
109 |
|
|
text += '\n' |
110 |
|
|
|
111 |
|
|
text += \ |
112 |
|
|
_("Questions and comments can be sent to the following addresses:\n" |
113 |
bernhard |
2140 |
"\tGeneral list (public):\n\t\t<[email protected]>\n" |
114 |
|
|
"\tDevelopers list (public):\n\t\t<[email protected]>\n" |
115 |
|
|
"\tThuban team at Intevation:\n\t\t<[email protected]>\n" |
116 |
|
|
) |
117 |
jonathan |
1305 |
|
118 |
jan |
2354 |
text += '\n\n' |
119 |
|
|
|
120 |
|
|
text += _("Details on the registered extensions:\n\n") |
121 |
|
|
|
122 |
|
|
if ext_registry: |
123 |
|
|
for ext in ext_registry: |
124 |
|
|
text += '%s %s:\n' % (ext.name, ext.version) |
125 |
|
|
text += _('Copyright %s\n') % ext.copyright |
126 |
|
|
text += _('Authors:\n') |
127 |
|
|
for author in ext.authors: |
128 |
|
|
text+= '\t%s\n' % author |
129 |
|
|
text += ext.desc |
130 |
jan |
2582 |
text += '\n' |
131 |
|
|
text += 'Status: %s' % ext.status |
132 |
jan |
2354 |
text += '\n\n' |
133 |
|
|
else: |
134 |
|
|
text += _('\tNone registered.\n') |
135 |
|
|
|
136 |
jonathan |
1305 |
self.text = text |
137 |
|
|
|
138 |
|
|
text_title = wxStaticText(self, -1, |
139 |
jan |
1628 |
_("Thuban is a program for exploring geographic data.\n\n") + |
140 |
bh |
2647 |
"Copyright 2001-2005 Intevation GmbH.\n" + |
141 |
jan |
1628 |
_("Thuban is licensed under the GNU GPL"), |
142 |
jonathan |
1305 |
style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE) |
143 |
|
|
|
144 |
|
|
textBox = wxTextCtrl(self, -1, text, |
145 |
|
|
style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP) |
146 |
|
|
w, h = (300, 150) |
147 |
|
|
textBox.SetSizeHints(w, h) |
148 |
|
|
textBox.SetSize((w, h)) |
149 |
|
|
|
150 |
|
|
button_close = wxButton(self, wxID_CANCEL, _("Close")) |
151 |
|
|
button_close.SetDefault() |
152 |
|
|
|
153 |
|
|
sizer = wxBoxSizer(wxVERTICAL) |
154 |
|
|
sizer.Add(text_title, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 10) |
155 |
|
|
sizer.Add(textBox, 1, wxALL|wxEXPAND, 10) |
156 |
|
|
sizer.Add(button_close, 0, wxALL|wxALIGN_RIGHT, 10) |
157 |
|
|
|
158 |
|
|
self.SetAutoLayout(True) |
159 |
|
|
self.SetSizer(sizer) |
160 |
|
|
sizer.Fit(self) |
161 |
|
|
sizer.SetSizeHints(self) |
162 |
|
|
self.Layout() |
163 |
|
|
|
164 |
|
|
EVT_BUTTON(self, wxID_CANCEL, self.OnCancel) |
165 |
|
|
|
166 |
|
|
def OnCancel(self, event): |
167 |
|
|
self.EndModal(wxID_CANCEL) |