1 |
# 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 |
"""The About Box""" |
9 |
|
10 |
__version__ = "$Revision$" |
11 |
# $Source$ |
12 |
# $Id$ |
13 |
|
14 |
from wxPython.wx import * |
15 |
|
16 |
from Thuban import _ |
17 |
from Thuban.version import versions |
18 |
|
19 |
class About(wxDialog): |
20 |
|
21 |
def __init__(self, parent): |
22 |
wxDialog.__init__(self, parent, -1, _("About Thuban"), |
23 |
style = wxDEFAULT_DIALOG_STYLE |
24 |
| wxSYSTEM_MENU |
25 |
| wxMINIMIZE_BOX |
26 |
| wxMAXIMIZE_BOX |
27 |
| wxRESIZE_BORDER, |
28 |
size = (400, 250)) |
29 |
|
30 |
text = _(#"Build Date: %s\n" |
31 |
"%s\n\n" |
32 |
"Currently using:\n" |
33 |
"\t%s\n" |
34 |
"\t%s\n" |
35 |
"\t%s\n" |
36 |
"\t%s\n" |
37 |
"\t%s\n\n" |
38 |
"Compiled against:\n" |
39 |
"\t%s\n" |
40 |
"\t%s\n\n" |
41 |
"Lead Developer:\n" |
42 |
"\tBernhard Herzog\n\n" |
43 |
"Developers:\n" |
44 |
"\tJonathan Coles\n" |
45 |
"\tFrank Koormann\n" |
46 |
"\tMartin Müller\n" |
47 |
"\tJan-Oliver Wagner\n\n" |
48 |
"Translators:\n" |
49 |
"\tFrench: Daniel Calvelo Aros\n" |
50 |
"\tItalian: Maurizio Napolitano\n" |
51 |
"\tRussian: Alex Shevlakov\n" |
52 |
"\tSpanish: Daniel Calvelo Aros\n\n" |
53 |
"Other Contributors:\n" |
54 |
"\tJonathan Byron\n" |
55 |
"\tBernhard Reiter\n\n" |
56 |
"Questions and comments can be sent to the following addresses:\n" |
57 |
"\tThuban developers:\n\t\t<[email protected]>\n" |
58 |
"\tThuban mailing list:\n\t\t<[email protected]>" |
59 |
% ("Thuban %s" % versions['thuban-long'], |
60 |
"wxPython %s" % versions['wxPython'], |
61 |
"Python %s" % versions['python'], |
62 |
"PySQLite %s" % versions['pysqlite'], |
63 |
"SQLite %s" % versions['sqlite'], |
64 |
"GDAL %s" % versions.get('gdal', "- not available"), |
65 |
"GTK %s" % versions.get('gtk', "- not available"), |
66 |
"proj %s" % versions['proj'])) |
67 |
|
68 |
self.text = text |
69 |
|
70 |
text_title = wxStaticText(self, -1, |
71 |
"Thuban is a program for exploring geographic data.\n\n" |
72 |
"Copyright 2001-2003 Intevation GmbH.\n" |
73 |
"Thuban is licensed under the GNU GPL", |
74 |
style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE) |
75 |
|
76 |
textBox = wxTextCtrl(self, -1, text, |
77 |
style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP) |
78 |
w, h = (300, 150) |
79 |
textBox.SetSizeHints(w, h) |
80 |
textBox.SetSize((w, h)) |
81 |
|
82 |
button_close = wxButton(self, wxID_CANCEL, _("Close")) |
83 |
button_close.SetDefault() |
84 |
|
85 |
sizer = wxBoxSizer(wxVERTICAL) |
86 |
sizer.Add(text_title, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 10) |
87 |
sizer.Add(textBox, 1, wxALL|wxEXPAND, 10) |
88 |
sizer.Add(button_close, 0, wxALL|wxALIGN_RIGHT, 10) |
89 |
|
90 |
self.SetAutoLayout(True) |
91 |
self.SetSizer(sizer) |
92 |
sizer.Fit(self) |
93 |
sizer.SetSizeHints(self) |
94 |
self.Layout() |
95 |
|
96 |
EVT_BUTTON(self, wxID_CANCEL, self.OnCancel) |
97 |
|
98 |
def OnCancel(self, event): |
99 |
self.EndModal(wxID_CANCEL) |
100 |
|
101 |
|