equal
deleted
inserted
replaced
34 import sys |
34 import sys |
35 import time |
35 import time |
36 import wx |
36 import wx |
37 from wx.lib.agw.hyperlink import HyperLinkCtrl |
37 from wx.lib.agw.hyperlink import HyperLinkCtrl |
38 |
38 |
39 |
|
40 #---------------------------------------------------------------------- |
|
41 |
39 |
42 class AboutDialog(wx.Dialog): |
40 class AboutDialog(wx.Dialog): |
43 """ |
41 """ |
44 A replacement About Dialog for Windows, as it uses a generic frame that |
42 A replacement About Dialog for Windows, as it uses a generic frame that |
45 well...sucks. |
43 well...sucks. |
104 |
102 |
105 def on_credits(self, event): |
103 def on_credits(self, event): |
106 CreditsDialog(self, self.info) |
104 CreditsDialog(self, self.info) |
107 |
105 |
108 |
106 |
109 #---------------------------------------------------------------------- |
|
110 |
|
111 class CreditsDialog(wx.Dialog): |
107 class CreditsDialog(wx.Dialog): |
112 def __init__(self, parent, info): |
108 def __init__(self, parent, info): |
113 wx.Dialog.__init__(self, parent, title=_("Credits"), size=(475, 320), |
109 wx.Dialog.__init__(self, parent, title=_("Credits"), size=(475, 320), |
114 style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) |
110 style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) |
115 |
111 |
142 self.SetEscapeId(close.GetId()) |
138 self.SetEscapeId(close.GetId()) |
143 |
139 |
144 close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy()) |
140 close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy()) |
145 |
141 |
146 |
142 |
147 #---------------------------------------------------------------------- |
|
148 |
|
149 class LicenseDialog(wx.Dialog): |
143 class LicenseDialog(wx.Dialog): |
150 def __init__(self, parent, info): |
144 def __init__(self, parent, info): |
151 wx.Dialog.__init__(self, parent, title=_("License"), size=(500, 400), |
145 wx.Dialog.__init__(self, parent, title=_("License"), size=(500, 400), |
152 style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) |
146 style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) |
153 |
147 |
171 self.Show() |
165 self.Show() |
172 self.SetEscapeId(close.GetId()) |
166 self.SetEscapeId(close.GetId()) |
173 |
167 |
174 close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy()) |
168 close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy()) |
175 |
169 |
176 #---------------------------------------------------------------------- |
|
177 |
|
178 |
170 |
179 def ShowAboutDialog(parent, info): |
171 def ShowAboutDialog(parent, info): |
180 if os.name == "nt": |
172 if os.name == "nt": |
181 AboutDialog(parent, info) |
173 AboutDialog(parent, info) |
182 else: |
174 else: |