/[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 1964 - (show annotations)
Wed Nov 19 19:48:47 2003 UTC (21 years, 3 months ago) by bh
File MIME type: text/x-python
File size: 4241 byte(s)
* Thuban/Model/resource.py: Rework the way gdal support is
determined so that we can give a reason in the about why gdal is
not supported.
(gdal_support_status): New. Variable holding a string with the
reason for no gdal support

* Thuban/UI/about.py (About.__init__): Add the reason why gdal is
not supported to the message

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 from Thuban.Model.resource import gdal_support_status
19
20 class About(wxDialog):
21
22 def __init__(self, parent):
23 wxDialog.__init__(self, parent, -1, _("About Thuban"),
24 style = wxDEFAULT_DIALOG_STYLE
25 | wxSYSTEM_MENU
26 | wxMINIMIZE_BOX
27 | wxMAXIMIZE_BOX
28 | wxRESIZE_BORDER,
29 size = (400, 250))
30
31 lead_developer = 'Bernhard Herzog'
32 developers = [ 'Jonathan Coles', 'Frank Koormann',
33 'Martin Müller', 'Jan-Oliver Wagner' ]
34 translators = [ ( _('French'), 'Daniel Calvelo Aros' ),
35 ( _('German'), 'Björn Broscheit'),
36 ( _('Italian'), 'Maurizio Napolitano'),
37 ( _('Russian'), 'Alex Shevlakov'),
38 ( _('Spanish'), 'Daniel Calvelo Aros') ]
39 other_contributors = [ 'Jonathan Byron', 'Silke Reimer',
40 'Bernhard Reiter' ]
41 dyn_modules = [ ('wxPython', versions['wxPython']),
42 ('Python', versions['python']),
43 ('PySQLite', versions['pysqlite']),
44 ('SQLite', versions['sqlite']),
45 ('GDAL', versions.get('gdal', _('- not available'))),
46 ('psycopg', versions.get('psycopg',
47 _('- not available')))]
48 direct_modules = [ \
49 ('GTK', versions.get('gtk', _('- not available'))),
50 ('proj', versions['proj']) ]
51
52 text = 'Thuban %s\n\n' % versions['thuban-long']
53
54 text += _('Currently using:\n')
55
56 for name, version in dyn_modules:
57 text+= '\t%s %s\n' % (name, version)
58 text += '\n'
59
60 if gdal_support_status:
61 text += gdal_support_status + "\n\n"
62
63 text += _('Compiled for:\n')
64
65 for name, version in direct_modules:
66 text+= '\t%s %s\n' % (name, version)
67 text += '\n'
68
69 text += _('Lead Developer:\n')
70 text += '\t%s\n\n' % lead_developer
71
72 text += _('Developers:\n')
73 for name in developers:
74 text += '\t%s\n' % name
75 text += '\n'
76
77 text += _('Translators:\n')
78 for lang, name in translators:
79 text += '\t%s: %s\n' % (lang, name)
80 text += '\n'
81
82 text += _('Other Contributors:\n')
83 for name in other_contributors:
84 text += '\t%s\n' % name
85 text += '\n'
86
87 text += \
88 _("Questions and comments can be sent to the following addresses:\n"
89 "\tThuban developers:\n\t\t<[email protected]>\n"
90 "\tThuban mailing list:\n\t\t<[email protected]>")
91
92 self.text = text
93
94 text_title = wxStaticText(self, -1,
95 _("Thuban is a program for exploring geographic data.\n\n") +
96 "Copyright 2001-2003 Intevation GmbH.\n" +
97 _("Thuban is licensed under the GNU GPL"),
98 style=wxST_NO_AUTORESIZE|wxALIGN_CENTRE)
99
100 textBox = wxTextCtrl(self, -1, text,
101 style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP)
102 w, h = (300, 150)
103 textBox.SetSizeHints(w, h)
104 textBox.SetSize((w, h))
105
106 button_close = wxButton(self, wxID_CANCEL, _("Close"))
107 button_close.SetDefault()
108
109 sizer = wxBoxSizer(wxVERTICAL)
110 sizer.Add(text_title, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 10)
111 sizer.Add(textBox, 1, wxALL|wxEXPAND, 10)
112 sizer.Add(button_close, 0, wxALL|wxALIGN_RIGHT, 10)
113
114 self.SetAutoLayout(True)
115 self.SetSizer(sizer)
116 sizer.Fit(self)
117 sizer.SetSizeHints(self)
118 self.Layout()
119
120 EVT_BUTTON(self, wxID_CANCEL, self.OnCancel)
121
122 def OnCancel(self, event):
123 self.EndModal(wxID_CANCEL)
124
125

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26