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 |
# |
# |
6 |
# This program is free software under the GPL (>=v2) |
# This program is free software under the GPL (>=v2) |
7 |
# Read the file COPYING coming with Thuban for details. |
# Read the file COPYING coming with Thuban for details. |
16 |
|
|
17 |
from Thuban import _ |
from Thuban import _ |
18 |
from Thuban.version import versions |
from Thuban.version import versions |
19 |
|
from Thuban.Model.resource import gdal_support_status |
20 |
|
|
21 |
class About(wxDialog): |
class About(wxDialog): |
22 |
|
|
29 |
| wxRESIZE_BORDER, |
| wxRESIZE_BORDER, |
30 |
size = (400, 250)) |
size = (400, 250)) |
31 |
|
|
32 |
text = _(#"Build Date: %s\n" |
# Note: The source code is in ASCII, so we escape some |
33 |
"%s\n\n" |
# characters to get byte strings in latin1. |
34 |
"Currently using:\n" |
lead_developer = 'Bernhard Herzog' |
35 |
"\t%s\n" |
developers = [ 'Jonathan Coles', 'Frank Koormann', |
36 |
"\t%s\n" |
unicodeToLocale(u'Martin M\xfcller'), 'Jan-Oliver Wagner' ] |
37 |
"\t%s\n" |
translators = [ ( _('French'), 'Daniel Calvelo Aros' ), |
38 |
"\t%s\n" |
( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')), |
39 |
"\t%s\n\n" |
( _('Italian'), 'Maurizio Napolitano'), |
40 |
"Compiled against:\n" |
( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'), |
41 |
"\t%s\n" |
( _('Russian'), 'Alex Shevlakov'), |
42 |
"\t%s\n\n" |
( _('Spanish'), 'Daniel Calvelo Aros') ] |
43 |
"Lead Developer:\n" |
other_contributors = [ 'Jonathan Byron', 'Silke Reimer', |
44 |
"\tBernhard Herzog\n\n" |
'Bernhard Reiter' ] |
45 |
"Developers:\n" |
dyn_modules = [ ('wxPython', versions['wxPython']), |
46 |
"\tJonathan Coles\n" |
('Python', versions['python']), |
47 |
"\tFrank Koormann\n" |
('PySQLite', versions['pysqlite']), |
48 |
"\tMartin M�ller\n" |
('SQLite', versions['sqlite']), |
49 |
"\tJan-Oliver Wagner\n\n" |
('GDAL', versions.get('gdal', _('- not available'))), |
50 |
"Translators:\n" |
('psycopg', versions.get('psycopg', |
51 |
"\tFrench: Daniel Calvelo Aros\n" |
_('- not available')))] |
52 |
"\tGerman: Bj�rn Broscheit\n" |
direct_modules = [ \ |
53 |
"\tItalian: Maurizio Napolitano\n" |
('GTK', versions.get('gtk', _('- not available'))), |
54 |
"\tRussian: Alex Shevlakov\n" |
('proj', versions['proj']) ] |
55 |
"\tSpanish: Daniel Calvelo Aros\n\n" |
|
56 |
"Other Contributors:\n" |
text = 'Thuban %s\n\n' % versions['thuban-long'] |
57 |
"\tJonathan Byron\n" |
|
58 |
"\tBernhard Reiter\n\n" |
text += _('Currently using:\n') |
59 |
"Questions and comments can be sent to the following addresses:\n" |
|
60 |
"\tThuban developers:\n\t\t<[email protected]>\n" |
for name, version in dyn_modules: |
61 |
"\tThuban mailing list:\n\t\t<[email protected]>" |
text+= '\t%s %s\n' % (name, version) |
62 |
% ("Thuban %s" % versions['thuban-long'], |
text += '\n' |
63 |
"wxPython %s" % versions['wxPython'], |
|
64 |
"Python %s" % versions['python'], |
if gdal_support_status: |
65 |
"PySQLite %s" % versions['pysqlite'], |
text += gdal_support_status + "\n\n" |
66 |
"SQLite %s" % versions['sqlite'], |
|
67 |
"GDAL %s" % versions.get('gdal', "- not available"), |
text += _('Compiled for:\n') |
68 |
"GTK %s" % versions.get('gtk', "- not available"), |
|
69 |
"proj %s" % versions['proj'])) |
for name, version in direct_modules: |
70 |
|
text+= '\t%s %s\n' % (name, version) |
71 |
|
text += '\n' |
72 |
|
|
73 |
|
text += _('Lead Developer:\n') |
74 |
|
text += '\t%s\n\n' % lead_developer |
75 |
|
|
76 |
|
text += _('Developers:\n') |
77 |
|
for name in developers: |
78 |
|
text += '\t%s\n' % name |
79 |
|
text += '\n' |
80 |
|
|
81 |
|
text += _('Translators:\n') |
82 |
|
for lang, name in translators: |
83 |
|
text += '\t%s: %s\n' % (lang, name) |
84 |
|
text += '\n' |
85 |
|
|
86 |
|
text += _('Other Contributors:\n') |
87 |
|
for name in other_contributors: |
88 |
|
text += '\t%s\n' % name |
89 |
|
text += '\n' |
90 |
|
|
91 |
|
text += \ |
92 |
|
_("Questions and comments can be sent to the following addresses:\n" |
93 |
|
"\tGeneral list (public):\n\t\t<[email protected]>\n" |
94 |
|
"\tDevelopers list (public):\n\t\t<[email protected]>\n" |
95 |
|
"\tThuban team at Intevation:\n\t\t<[email protected]>\n" |
96 |
|
) |
97 |
|
|
98 |
self.text = text |
self.text = text |
99 |
|
|
100 |
text_title = wxStaticText(self, -1, |
text_title = wxStaticText(self, -1, |
101 |
"Thuban is a program for exploring geographic data.\n\n" |
_("Thuban is a program for exploring geographic data.\n\n") + |
102 |
"Copyright 2001-2003 Intevation GmbH.\n" |
"Copyright 2001-2004 Intevation GmbH.\n" + |
103 |
"Thuban is licensed under the GNU GPL", |
_("Thuban is licensed under the GNU GPL"), |
104 |
style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE) |
style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE) |
105 |
|
|
106 |
textBox = wxTextCtrl(self, -1, text, |
textBox = wxTextCtrl(self, -1, text, |
129 |
self.EndModal(wxID_CANCEL) |
self.EndModal(wxID_CANCEL) |
130 |
|
|
131 |
|
|
132 |
|
def unicodeToLocale(unicodeStr): |
133 |
|
" Function to convert a unicode object to an object \ in the user's locale encoding" |
134 |
|
|
135 |
|
|
136 |
|
from locale import getlocale |
137 |
|
|
138 |
|
return unicodeStr.encode(getlocale()[1]) |
139 |
|
|