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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2461 - (show annotations)
Wed Dec 15 14:49:55 2004 UTC (20 years, 2 months ago) by bh
File MIME type: text/x-python
File size: 4821 byte(s)
Backports from HEAD

* Thuban/UI/about.py (About.__init__): Add the
thuban@intevation.de address and rephrase the email address
section as in HEAD

* Thuban/UI/exceptiondialog.py (ExceptionDialog.dialog_layout):
Improved button string to stronger clearify that Thuban will be
closed when hitting the button.

* Thuban/UI/multiplechoicedialog.py: Add missing import of
wxPython.wx itself (as opposed to the contents of wxPython.wx).
For some reason wxPython.wx is available as wxPython.wx.wx in at
least some 2.4 releases.  Fixes RT#2482 wrt. wxPython 2.4.

* Thuban/UI/viewport.py (ViewPort.map_projection_changed): Only
try to keep the same region visible when the map actually contains
something

* test/test_viewport.py
(ViewPortTest.test_changing_map_projection): Check that changing
the projection of an empty map shown in a viewport doesn't lead to
exceptions in the viewport's handler for the
MAP_PROJECTION_CHANGED messages

1 # Copyright (c) 2001-2004 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 """The About Box"""
9
10 __version__ = "$Revision$"
11 # $Source$
12 # $Id$
13
14 from wxPython.wx import *
15
16 from locale import getlocale
17
18 from Thuban import _
19 from Thuban.version import versions
20 from Thuban.Model.resource import gdal_support_status
21
22 class About(wxDialog):
23
24 def __init__(self, parent):
25 wxDialog.__init__(self, parent, -1, _("About Thuban"),
26 style = wxDEFAULT_DIALOG_STYLE
27 | wxSYSTEM_MENU
28 | wxMINIMIZE_BOX
29 | wxMAXIMIZE_BOX
30 | wxRESIZE_BORDER,
31 size = (400, 250))
32
33 # Note: The source code is in ASCII, so we escape some
34 # characters to get byte strings in latin1.
35 lead_developer = 'Bernhard Herzog'
36 developers = [ 'Jonathan Coles', 'Frank Koormann',
37 unicodeToLocale(u'Martin M\xfcller'),
38 'Jan-Oliver Wagner' ]
39 translators = [ ( _('French'), 'Daniel Calvelo Aros' ),
40 ( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')),
41 ( _('Hungarian'), 'Norbert Solymosi'),
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 self.text = text
101
102 text_title = wxStaticText(self, -1,
103 _("Thuban is a program for exploring geographic data.\n\n") +
104 "Copyright 2001-2004 Intevation GmbH.\n" +
105 _("Thuban is licensed under the GNU GPL"),
106 style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE)
107
108 textBox = wxTextCtrl(self, -1, text,
109 style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP)
110 w, h = (300, 150)
111 textBox.SetSizeHints(w, h)
112 textBox.SetSize((w, h))
113
114 button_close = wxButton(self, wxID_CANCEL, _("Close"))
115 button_close.SetDefault()
116
117 sizer = wxBoxSizer(wxVERTICAL)
118 sizer.Add(text_title, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 10)
119 sizer.Add(textBox, 1, wxALL|wxEXPAND, 10)
120 sizer.Add(button_close, 0, wxALL|wxALIGN_RIGHT, 10)
121
122 self.SetAutoLayout(True)
123 self.SetSizer(sizer)
124 sizer.Fit(self)
125 sizer.SetSizeHints(self)
126 self.Layout()
127
128 EVT_BUTTON(self, wxID_CANCEL, self.OnCancel)
129
130 def OnCancel(self, event):
131 self.EndModal(wxID_CANCEL)
132
133
134 def unicodeToLocale(unicodeStr):
135 "Function to convert unicode to the user's locale encoding"
136
137 return unicodeStr.encode(getlocale()[1])

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26