/[thuban]/trunk/thuban/Thuban/UI/about.py
ViewVC logotype

Contents of /trunk/thuban/Thuban/UI/about.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2338 - (show annotations)
Fri Aug 20 16:50:22 2004 UTC (20 years, 6 months ago) by silke
File MIME type: text/x-python
File size: 4842 byte(s)
Changes to be consistent with coding style

1 # Copyright (c) 2001, 2002, 2003, 2004 by Intevation GmbH
2 # Authors:
3 # 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)
8 # Read the file COPYING coming with Thuban for details.
9
10 """The About Box"""
11
12 __version__ = "$Revision$"
13 # $Source$
14 # $Id$
15
16 from wxPython.wx import *
17
18 from locale import getlocale
19
20 from Thuban import _
21 from Thuban.version import versions
22 from Thuban.Model.resource import gdal_support_status
23
24 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 # Note: The source code is in ASCII, so we escape some
36 # characters to get byte strings in latin1.
37 lead_developer = 'Bernhard Herzog'
38 developers = [ 'Jonathan Coles', 'Frank Koormann',
39 unicodeToLocale(u'Martin M\xfcller'), 'Jan-Oliver Wagner' ]
40 translators = [ ( _('French'), 'Daniel Calvelo Aros' ),
41 ( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')),
42 ( _('Italian'), 'Maurizio Napolitano'),
43 ( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'),
44 ( _('Russian'), 'Alex Shevlakov'),
45 ( _('Spanish'), 'Daniel Calvelo Aros') ]
46 other_contributors = [ 'Jonathan Byron', 'Silke Reimer',
47 'Bernhard Reiter' ]
48 dyn_modules = [ ('wxPython', versions['wxPython']),
49 ('Python', versions['python']),
50 ('PySQLite', versions['pysqlite']),
51 ('SQLite', versions['sqlite']),
52 ('GDAL', versions.get('gdal', _('- not available'))),
53 ('psycopg', versions.get('psycopg',
54 _('- not available')))]
55 direct_modules = [ \
56 ('GTK', versions.get('gtk', _('- not available'))),
57 ('proj', versions['proj']) ]
58
59 text = 'Thuban %s\n\n' % versions['thuban-long']
60
61 text += _('Currently using:\n')
62
63 for name, version in dyn_modules:
64 text+= '\t%s %s\n' % (name, version)
65 text += '\n'
66
67 if gdal_support_status:
68 text += gdal_support_status + "\n\n"
69
70 text += _('Compiled for:\n')
71
72 for name, version in direct_modules:
73 text+= '\t%s %s\n' % (name, version)
74 text += '\n'
75
76 text += _('Lead Developer:\n')
77 text += '\t%s\n\n' % lead_developer
78
79 text += _('Developers:\n')
80 for name in developers:
81 text += '\t%s\n' % name
82 text += '\n'
83
84 text += _('Translators:\n')
85 for lang, name in translators:
86 text += '\t%s: %s\n' % (lang, name)
87 text += '\n'
88
89 text += _('Other Contributors:\n')
90 for name in other_contributors:
91 text += '\t%s\n' % name
92 text += '\n'
93
94 text += \
95 _("Questions and comments can be sent to the following addresses:\n"
96 "\tGeneral list (public):\n\t\t<[email protected]>\n"
97 "\tDevelopers list (public):\n\t\t<[email protected]>\n"
98 "\tThuban team at Intevation:\n\t\t<[email protected]>\n"
99 )
100
101 self.text = text
102
103 text_title = wxStaticText(self, -1,
104 _("Thuban is a program for exploring geographic data.\n\n") +
105 "Copyright 2001-2004 Intevation GmbH.\n" +
106 _("Thuban is licensed under the GNU GPL"),
107 style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE)
108
109 textBox = wxTextCtrl(self, -1, text,
110 style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP)
111 w, h = (300, 150)
112 textBox.SetSizeHints(w, h)
113 textBox.SetSize((w, h))
114
115 button_close = wxButton(self, wxID_CANCEL, _("Close"))
116 button_close.SetDefault()
117
118 sizer = wxBoxSizer(wxVERTICAL)
119 sizer.Add(text_title, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 10)
120 sizer.Add(textBox, 1, wxALL|wxEXPAND, 10)
121 sizer.Add(button_close, 0, wxALL|wxALIGN_RIGHT, 10)
122
123 self.SetAutoLayout(True)
124 self.SetSizer(sizer)
125 sizer.Fit(self)
126 sizer.SetSizeHints(self)
127 self.Layout()
128
129 EVT_BUTTON(self, wxID_CANCEL, self.OnCancel)
130
131 def OnCancel(self, event):
132 self.EndModal(wxID_CANCEL)
133
134
135 def unicodeToLocale(unicodeStr):
136 "Function to convert unicode to the user's locale encoding"
137
138 return unicodeStr.encode(getlocale()[1])
139

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26