1 # -*- coding: UTF-8 -*-
2 # vim: expandtab sw=4 ts=4 sts=4:
7 __author__
= 'Michal Čihař'
8 __email__
= 'michal@cihar.com'
10 Copyright © 2003 - 2010 Michal Čihař
12 This program is free software; you can redistribute it and/or modify it
13 under the terms of the GNU General Public License version 2 as published by
14 the Free Software Foundation.
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
21 You should have received a copy of the GNU General Public License along with
22 this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 if Wammu
.gammu_error
== None:
35 from Wammu
.Locales
import hgettext
as _
, HtmlStrConv
37 class AboutBox(wx
.Dialog
):
39 Displays box showing information about program including versions of used
42 def __init__(self
, parent
):
43 wx
.Dialog
.__init
__(self
, parent
, -1, _('About Wammu'))
45 copyrightline
= u
'Copyright © 2003 - 2007 Michal Čihař'
47 # default system colours
48 bgc
= wx
.SystemSettings
.GetColour(wx
.SYS_COLOUR_BTNFACE
)
49 fgc
= wx
.SystemSettings
.GetColour(wx
.SYS_COLOUR_BTNTEXT
)
50 hfgc
= wx
.SystemSettings
.GetColour(wx
.SYS_COLOUR_BTNHIGHLIGHT
)
52 colours
= 'text="#%02x%02x%02x" bgcolor="#%02x%02x%02x" link="#%02x%02x%02x"' % (
53 fgc
.Red(), fgc
.Green(), fgc
.Blue(),
54 bgc
.Red(), bgc
.Green(), bgc
.Blue(),
55 hfgc
.Red(), hfgc
.Green(), hfgc
.Blue())
60 <center><font color="#ffffff"><table bgcolor="#458154" width="100%%" cellspacing="0"
61 cellpadding="0" border="1">
81 <wxp module="wx" class="Button">
82 <param name="id" value="ID_OK">
89 ''' % (colours
, '''<img src="%s"><br><h2> Wammu %s</h2>
93 ''' % (Wammu
.Paths
.AppIconPath('wammu'),
95 _('Running on Python %s') % sys
.version
.split()[0],
96 _('Using wxPython %s') % wx
.VERSION_STRING
,
97 _('Using python-gammu %(python_gammu_version)s and Gammu %(gammu_version)s') %
99 'python_gammu_version':gammu
.Version()[1],
100 'gammu_version': gammu
.Version()[0]
102 _('<b>Wammu</b> is a wxPython based GUI for Gammu.'),
105 This program is free software; you can redistribute it and/or modify
106 it under the terms of the GNU General Public License version 2 as
107 published by the Free Software Foundation.
110 This program is distributed in the hope that it will be useful,
111 but WITHOUT ANY WARRANTY; without even the implied warranty of
112 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113 GNU General Public License for more details.
116 html
= wx
.html
.HtmlWindow(self
, -1, size
= (500, -1))
118 btn
= html
.FindWindowById(wx
.ID_OK
)
121 representation
= html
.GetInternalRepresentation()
122 html
.SetSize( (representation
.GetWidth()+25, representation
.GetHeight()+25) )
123 self
.SetClientSize(html
.GetSize())
124 self
.CentreOnParent(wx
.BOTH
)