[41d466f] | 1 | #!/usr/bin/env python |
---|
| 2 | ######################################################################## |
---|
| 3 | # |
---|
| 4 | # PDFgui by DANSE Diffraction group |
---|
| 5 | # Simon J. L. Billinge |
---|
| 6 | # (c) 2006 trustees of the Michigan State University. |
---|
| 7 | # All rights reserved. |
---|
| 8 | # |
---|
| 9 | # File coded by: Dmitriy Bryndin |
---|
| 10 | # |
---|
| 11 | # See AUTHORS.txt for a list of people who contributed. |
---|
| 12 | # See LICENSE.txt for license information. |
---|
| 13 | # |
---|
| 14 | # Modified by U. Tennessee for DANSE/SANS |
---|
| 15 | ######################################################################## |
---|
| 16 | |
---|
| 17 | # version |
---|
| 18 | __id__ = "$Id: aboutdialog.py 1193 2007-05-03 17:29:59Z dmitriy $" |
---|
| 19 | __revision__ = "$Revision: 1193 $" |
---|
| 20 | |
---|
| 21 | import wx |
---|
| 22 | import wx.lib.hyperlink |
---|
| 23 | import random |
---|
| 24 | import os.path |
---|
| 25 | import os |
---|
[efe730d] | 26 | |
---|
| 27 | from sas.sasgui import get_local_config |
---|
| 28 | config = get_local_config() |
---|
[41d466f] | 29 | |
---|
| 30 | def launchBrowser(url): |
---|
[d955bf19] | 31 | """ |
---|
| 32 | Launches browser and opens specified url |
---|
[41d466f] | 33 | |
---|
| 34 | In some cases may require BROWSER environment variable to be set up. |
---|
| 35 | |
---|
[d955bf19] | 36 | :param url: URL to open |
---|
| 37 | |
---|
| 38 | """ |
---|
[41d466f] | 39 | import webbrowser |
---|
| 40 | webbrowser.open(url) |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | class DialogAbout(wx.Dialog): |
---|
[d955bf19] | 44 | """ |
---|
| 45 | "About" Dialog |
---|
[41d466f] | 46 | |
---|
| 47 | Shows product name, current version, authors, and link to the product page. |
---|
| 48 | Current version is taken from version.py |
---|
[d955bf19] | 49 | |
---|
| 50 | """ |
---|
[41d466f] | 51 | |
---|
| 52 | def __init__(self, *args, **kwds): |
---|
| 53 | |
---|
| 54 | # begin wxGlade: DialogAbout.__init__ |
---|
| 55 | kwds["style"] = wx.DEFAULT_DIALOG_STYLE |
---|
| 56 | wx.Dialog.__init__(self, *args, **kwds) |
---|
| 57 | |
---|
| 58 | file_dir = os.path.dirname(__file__) |
---|
| 59 | |
---|
[32c0841] | 60 | # Mac doesn't display images with transparent background so well, |
---|
| 61 | # keep it for Windows |
---|
| 62 | image = file_dir + "/images/angles_flat.png" |
---|
[2bd9927] | 63 | |
---|
[41d466f] | 64 | if os.path.isfile(config._corner_image): |
---|
| 65 | image = config._corner_image |
---|
| 66 | |
---|
| 67 | if os.name == 'nt': |
---|
| 68 | self.bitmap_logo = wx.StaticBitmap(self, -1, wx.Bitmap(image)) |
---|
| 69 | else: |
---|
| 70 | self.bitmap_logo = wx.StaticBitmap(self, -1, wx.Bitmap(image)) |
---|
| 71 | |
---|
| 72 | self.label_title = wx.StaticText(self, -1, config.__appname__) |
---|
| 73 | self.label_version = wx.StaticText(self, -1, "") |
---|
| 74 | self.label_build = wx.StaticText(self, -1, "Build:") |
---|
| 75 | self.label_svnrevision = wx.StaticText(self, -1, "") |
---|
| 76 | self.label_copyright = wx.StaticText(self, -1, config._copyright) |
---|
| 77 | self.label_author = wx.StaticText(self, -1, "authors") |
---|
[32c0841] | 78 | self.hyperlink = wx.lib.hyperlink.HyperLinkCtrl(self, -1, |
---|
| 79 | config._homepage, |
---|
| 80 | URL=config._homepage) |
---|
| 81 | #self.hyperlink_license = wx.lib.hyperlink.HyperLinkCtrl(self, -1, |
---|
| 82 | #"Comments? Bugs? Requests?", URL=config._paper) |
---|
| 83 | self.hyperlink_license = wx.StaticText(self, -1, |
---|
| 84 | "Comments? Bugs? Requests?") |
---|
| 85 | self.hyperlink_paper = wx.lib.hyperlink.HyperLinkCtrl(self, -1, |
---|
| 86 | "Send us a ticket", |
---|
| 87 | URL=config._license) |
---|
| 88 | self.hyperlink_download = wx.lib.hyperlink.HyperLinkCtrl(self, -1, |
---|
| 89 | "Get the latest version", |
---|
| 90 | URL=config._download) |
---|
[41d466f] | 91 | self.static_line_1 = wx.StaticLine(self, -1) |
---|
[32c0841] | 92 | self.label_acknowledgement = wx.StaticText(self, -1, |
---|
| 93 | config._acknowledgement) |
---|
[41d466f] | 94 | self.static_line_2 = wx.StaticLine(self, -1) |
---|
[1452132] | 95 | self.bitmap_button_nist = wx.BitmapButton(self, -1, wx.NullBitmap) |
---|
| 96 | self.bitmap_button_umd = wx.BitmapButton(self, -1, wx.NullBitmap) |
---|
| 97 | self.bitmap_button_sns = wx.BitmapButton(self, -1, wx.NullBitmap) |
---|
[657e52c] | 98 | #self.bitmap_button_nsf = wx.BitmapButton(self, -1, |
---|
| 99 | # wx.NullBitmap) |
---|
| 100 | #self.bitmap_button_danse = wx.BitmapButton(self, -1, wx.NullBitmap) |
---|
[41d466f] | 101 | self.bitmap_button_msu = wx.BitmapButton(self, -1, wx.NullBitmap) |
---|
[657e52c] | 102 | |
---|
| 103 | self.bitmap_button_isis = wx.BitmapButton(self, -1, wx.NullBitmap) |
---|
| 104 | self.bitmap_button_ess = wx.BitmapButton(self, -1, wx.NullBitmap) |
---|
| 105 | self.bitmap_button_ill = wx.BitmapButton(self, -1, wx.NullBitmap) |
---|
| 106 | |
---|
[41d466f] | 107 | self.static_line_3 = wx.StaticLine(self, -1) |
---|
| 108 | self.button_OK = wx.Button(self, wx.ID_OK, "OK") |
---|
| 109 | |
---|
| 110 | self.__set_properties() |
---|
| 111 | self.__do_layout() |
---|
[1452132] | 112 | |
---|
| 113 | self.Bind(wx.EVT_BUTTON, self.onNistLogo, self.bitmap_button_nist) |
---|
| 114 | self.Bind(wx.EVT_BUTTON, self.onUmdLogo, self.bitmap_button_umd) |
---|
| 115 | self.Bind(wx.EVT_BUTTON, self.onSnsLogo, self.bitmap_button_sns) |
---|
[657e52c] | 116 | #self.Bind(wx.EVT_BUTTON, self.onNsfLogo, self.bitmap_button_nsf) |
---|
| 117 | #self.Bind(wx.EVT_BUTTON, self.onDanseLogo, self.bitmap_button_danse) |
---|
[41d466f] | 118 | self.Bind(wx.EVT_BUTTON, self.onUTLogo, self.bitmap_button_msu) |
---|
[657e52c] | 119 | self.Bind(wx.EVT_BUTTON, self.onIsisLogo, self.bitmap_button_isis) |
---|
| 120 | self.Bind(wx.EVT_BUTTON, self.onEssLogo, self.bitmap_button_ess) |
---|
| 121 | self.Bind(wx.EVT_BUTTON, self.onIllLogo, self.bitmap_button_ill) |
---|
[41d466f] | 122 | # end wxGlade |
---|
| 123 | # fill in acknowledgements |
---|
[32c0841] | 124 | #self.text_ctrl_acknowledgement.SetValue(__acknowledgement__) |
---|
[41d466f] | 125 | # randomly shuffle authors' names |
---|
| 126 | random.shuffle(config._authors) |
---|
| 127 | strLabel = ", ".join(config._authors) |
---|
| 128 | |
---|
| 129 | # display version and svn revison numbers |
---|
| 130 | verwords = config.__version__.split('.') |
---|
| 131 | version = '.'.join(verwords[:-1]) |
---|
| 132 | revision = verwords[-1] |
---|
[3bc6090] | 133 | try: |
---|
| 134 | build_num = str(config.__build__) |
---|
| 135 | except: |
---|
| 136 | build_num = str(config.__version__) |
---|
[41d466f] | 137 | self.label_author.SetLabel(strLabel) |
---|
[1c97a3f] | 138 | self.label_version.SetLabel(config.__version__)#(version) |
---|
[3bc6090] | 139 | self.label_svnrevision.SetLabel(build_num) |
---|
[41d466f] | 140 | |
---|
| 141 | # set bitmaps for logo buttons |
---|
[1452132] | 142 | image = file_dir + "/images/nist_logo.png" |
---|
| 143 | if os.path.isfile(config._nist_logo): |
---|
| 144 | image = config._nist_logo |
---|
| 145 | logo = wx.Bitmap(image) |
---|
| 146 | self.bitmap_button_nist.SetBitmapLabel(logo) |
---|
| 147 | |
---|
| 148 | image = file_dir + "/images/umd_logo.png" |
---|
| 149 | if os.path.isfile(config._umd_logo): |
---|
| 150 | image = config._umd_logo |
---|
| 151 | logo = wx.Bitmap(image) |
---|
| 152 | self.bitmap_button_umd.SetBitmapLabel(logo) |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | image = file_dir + "/images/sns_logo.png" |
---|
| 156 | if os.path.isfile(config._sns_logo): |
---|
| 157 | image = config._sns_logo |
---|
| 158 | logo = wx.Bitmap(image) |
---|
| 159 | self.bitmap_button_sns.SetBitmapLabel(logo) |
---|
| 160 | |
---|
[657e52c] | 161 | """ |
---|
[32c0841] | 162 | image = file_dir + "/images/nsf_logo.png" |
---|
[41d466f] | 163 | if os.path.isfile(config._nsf_logo): |
---|
| 164 | image = config._nsf_logo |
---|
| 165 | logo = wx.Bitmap(image) |
---|
| 166 | self.bitmap_button_nsf.SetBitmapLabel(logo) |
---|
| 167 | |
---|
[32c0841] | 168 | image = file_dir + "/images/danse_logo.png" |
---|
[41d466f] | 169 | if os.path.isfile(config._danse_logo): |
---|
| 170 | image = config._danse_logo |
---|
| 171 | logo = wx.Bitmap(image) |
---|
| 172 | self.bitmap_button_danse.SetBitmapLabel(logo) |
---|
[657e52c] | 173 | """ |
---|
[32c0841] | 174 | image = file_dir + "/images/utlogo.gif" |
---|
[41d466f] | 175 | if os.path.isfile(config._inst_logo): |
---|
| 176 | image = config._inst_logo |
---|
| 177 | logo = wx.Bitmap(image) |
---|
| 178 | self.bitmap_button_msu.SetBitmapLabel(logo) |
---|
| 179 | |
---|
[657e52c] | 180 | image = file_dir + "/images/isis_logo.png" |
---|
| 181 | if os.path.isfile(config._isis_logo): |
---|
| 182 | image = config._isis_logo |
---|
| 183 | logo = wx.Bitmap(image) |
---|
| 184 | self.bitmap_button_isis.SetBitmapLabel(logo) |
---|
| 185 | |
---|
| 186 | image = file_dir + "/images/ess_logo.png" |
---|
| 187 | if os.path.isfile(config._ess_logo): |
---|
| 188 | image = config._ess_logo |
---|
| 189 | logo = wx.Bitmap(image) |
---|
| 190 | self.bitmap_button_ess.SetBitmapLabel(logo) |
---|
| 191 | |
---|
| 192 | image = file_dir + "/images/ill_logo.png" |
---|
| 193 | if os.path.isfile(config._ill_logo): |
---|
| 194 | image = config._ill_logo |
---|
| 195 | logo = wx.Bitmap(image) |
---|
| 196 | self.bitmap_button_ill.SetBitmapLabel(logo) |
---|
| 197 | |
---|
[41d466f] | 198 | # resize dialog window to fit version number nicely |
---|
[32c0841] | 199 | if wx.VERSION >= (2, 7, 2, 0): |
---|
[41d466f] | 200 | size = [self.GetEffectiveMinSize()[0], self.GetSize()[1]] |
---|
| 201 | else: |
---|
| 202 | size = [self.GetBestFittingSize()[0], self.GetSize()[1]] |
---|
| 203 | self.Fit() |
---|
| 204 | |
---|
| 205 | def __set_properties(self): |
---|
[d955bf19] | 206 | """ |
---|
| 207 | """ |
---|
[41d466f] | 208 | # begin wxGlade: DialogAbout.__set_properties |
---|
| 209 | self.SetTitle("About") |
---|
| 210 | self.SetSize((600, 595)) |
---|
[32c0841] | 211 | self.label_title.SetFont(wx.Font(26, wx.DEFAULT, wx.NORMAL, |
---|
| 212 | wx.BOLD, 0, "")) |
---|
| 213 | self.label_version.SetFont(wx.Font(26, wx.DEFAULT, wx.NORMAL, |
---|
| 214 | wx.NORMAL, 0, "")) |
---|
[41d466f] | 215 | self.hyperlink_paper.Enable(True) |
---|
[1452132] | 216 | self.bitmap_button_nist.SetSize(self.bitmap_button_nist.GetBestSize()) |
---|
| 217 | self.bitmap_button_umd.SetSize(self.bitmap_button_umd.GetBestSize()) |
---|
| 218 | self.bitmap_button_sns.SetSize(self.bitmap_button_sns.GetBestSize()) |
---|
[657e52c] | 219 | #self.bitmap_button_nsf.SetSize(self.bitmap_button_nsf.GetBestSize()) |
---|
| 220 | #self.bitmap_button_danse.SetSize(self.bitmap_button_danse.GetBestSize()) |
---|
[41d466f] | 221 | self.bitmap_button_msu.SetSize(self.bitmap_button_msu.GetBestSize()) |
---|
[657e52c] | 222 | self.bitmap_button_isis.SetSize(self.bitmap_button_isis.GetBestSize()) |
---|
| 223 | self.bitmap_button_ess.SetSize(self.bitmap_button_ess.GetBestSize()) |
---|
| 224 | self.bitmap_button_ill.SetSize(self.bitmap_button_ill.GetBestSize()) |
---|
[41d466f] | 225 | # end wxGlade |
---|
| 226 | |
---|
| 227 | def __do_layout(self): |
---|
[d955bf19] | 228 | """ |
---|
| 229 | """ |
---|
[41d466f] | 230 | # begin wxGlade: DialogAbout.__do_layout |
---|
| 231 | sizer_main = wx.BoxSizer(wx.VERTICAL) |
---|
| 232 | sizer_button = wx.BoxSizer(wx.HORIZONTAL) |
---|
| 233 | sizer_logos = wx.BoxSizer(wx.HORIZONTAL) |
---|
| 234 | sizer_header = wx.BoxSizer(wx.HORIZONTAL) |
---|
| 235 | sizer_titles = wx.BoxSizer(wx.VERTICAL) |
---|
| 236 | sizer_build = wx.BoxSizer(wx.HORIZONTAL) |
---|
| 237 | sizer_title = wx.BoxSizer(wx.HORIZONTAL) |
---|
| 238 | sizer_header.Add(self.bitmap_logo, 0, wx.EXPAND, 0) |
---|
[32c0841] | 239 | sizer_title.Add(self.label_title, 0, |
---|
| 240 | wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 10) |
---|
[41d466f] | 241 | sizer_title.Add((20, 20), 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0) |
---|
[32c0841] | 242 | sizer_title.Add(self.label_version, 0, |
---|
| 243 | wx.RIGHT|wx.ALIGN_BOTTOM|wx.ADJUST_MINSIZE, 10) |
---|
[41d466f] | 244 | sizer_titles.Add(sizer_title, 0, wx.EXPAND, 0) |
---|
[32c0841] | 245 | sizer_build.Add(self.label_build, 0, |
---|
| 246 | wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10) |
---|
[41d466f] | 247 | sizer_build.Add(self.label_svnrevision, 0, wx.ADJUST_MINSIZE, 0) |
---|
| 248 | sizer_titles.Add(sizer_build, 0, wx.TOP|wx.EXPAND, 5) |
---|
[32c0841] | 249 | sizer_titles.Add(self.label_copyright, 0, |
---|
| 250 | wx.LEFT|wx.RIGHT|wx.TOP|wx.ADJUST_MINSIZE, 10) |
---|
| 251 | sizer_titles.Add(self.label_author, 0, |
---|
| 252 | wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10) |
---|
[41d466f] | 253 | sizer_titles.Add(self.hyperlink, 0, wx.LEFT|wx.RIGHT, 10) |
---|
| 254 | sizer_titles.Add((20, 20), 0, wx.ADJUST_MINSIZE, 0) |
---|
| 255 | sizer_titles.Add(self.hyperlink_license, 0, wx.LEFT|wx.RIGHT, 10) |
---|
| 256 | sizer_titles.Add(self.hyperlink_paper, 0, wx.LEFT|wx.RIGHT, 10) |
---|
| 257 | sizer_titles.Add((20, 20), 0, wx.ADJUST_MINSIZE, 0) |
---|
| 258 | sizer_titles.Add(self.hyperlink_download, 0, wx.LEFT|wx.RIGHT, 10) |
---|
| 259 | sizer_header.Add(sizer_titles, 0, wx.EXPAND, 0) |
---|
| 260 | sizer_main.Add(sizer_header, 0, wx.BOTTOM|wx.EXPAND, 3) |
---|
| 261 | sizer_main.Add(self.static_line_1, 0, wx.EXPAND, 0) |
---|
[32c0841] | 262 | sizer_main.Add(self.label_acknowledgement, 0, |
---|
| 263 | wx.LEFT|wx.TOP|wx.BOTTOM|wx.ADJUST_MINSIZE, 7) |
---|
[41d466f] | 264 | sizer_main.Add(self.static_line_2, 0, wx.EXPAND, 0) |
---|
[657e52c] | 265 | |
---|
| 266 | sizer_logos.Add(self.bitmap_button_msu, 0, |
---|
| 267 | wx.LEFT|wx.ADJUST_MINSIZE, 2) |
---|
| 268 | #sizer_logos.Add(self.bitmap_button_danse, 0, |
---|
| 269 | # wx.LEFT|wx.ADJUST_MINSIZE, 2) |
---|
| 270 | #sizer_logos.Add(self.bitmap_button_nsf, 0, |
---|
| 271 | # wx.LEFT|wx.ADJUST_MINSIZE, 2) |
---|
| 272 | sizer_logos.Add(self.bitmap_button_umd, 0, |
---|
| 273 | wx.LEFT|wx.ADJUST_MINSIZE, 2) |
---|
| 274 | sizer_logos.Add(self.bitmap_button_nist, 0, |
---|
| 275 | wx.LEFT|wx.ADJUST_MINSIZE, 2) |
---|
| 276 | sizer_logos.Add(self.bitmap_button_sns, 0, |
---|
| 277 | wx.LEFT|wx.ADJUST_MINSIZE, 2) |
---|
| 278 | sizer_logos.Add(self.bitmap_button_isis, 0, |
---|
| 279 | wx.LEFT|wx.ADJUST_MINSIZE, 2) |
---|
| 280 | sizer_logos.Add(self.bitmap_button_ess, 0, |
---|
[32c0841] | 281 | wx.LEFT|wx.ADJUST_MINSIZE, 2) |
---|
[657e52c] | 282 | sizer_logos.Add(self.bitmap_button_ill, 0, |
---|
| 283 | wx.LEFT|wx.ADJUST_MINSIZE, 2) |
---|
| 284 | |
---|
| 285 | sizer_logos.Add((10, 50), 0, wx.ADJUST_MINSIZE, 0) |
---|
[41d466f] | 286 | sizer_main.Add(sizer_logos, 0, wx.EXPAND, 0) |
---|
| 287 | sizer_main.Add(self.static_line_3, 0, wx.EXPAND, 0) |
---|
[657e52c] | 288 | sizer_button.Add((20, 40), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0) |
---|
[3c965fd] | 289 | sizer_button.Add(self.button_OK, 0, |
---|
[657e52c] | 290 | wx.RIGHT|wx.ADJUST_MINSIZE|wx.CENTER, 10) |
---|
[41d466f] | 291 | sizer_main.Add(sizer_button, 0, wx.EXPAND, 0) |
---|
| 292 | self.SetAutoLayout(True) |
---|
| 293 | self.SetSizer(sizer_main) |
---|
| 294 | self.Layout() |
---|
| 295 | self.Centre() |
---|
| 296 | # end wxGlade |
---|
| 297 | |
---|
[1452132] | 298 | def onNistLogo(self, event): |
---|
| 299 | """ |
---|
| 300 | """ |
---|
| 301 | # wxGlade: DialogAbout.<event_handler> |
---|
| 302 | launchBrowser(config._nist_url) |
---|
| 303 | event.Skip() |
---|
| 304 | |
---|
| 305 | def onUmdLogo(self, event): |
---|
| 306 | """ |
---|
| 307 | """ |
---|
| 308 | # wxGlade: DialogAbout.<event_handler> |
---|
| 309 | launchBrowser(config._umd_url) |
---|
| 310 | event.Skip() |
---|
| 311 | |
---|
| 312 | def onSnsLogo(self, event): |
---|
| 313 | """ |
---|
| 314 | """ |
---|
| 315 | # wxGlade: DialogAbout.<event_handler> |
---|
| 316 | launchBrowser(config._sns_url) |
---|
| 317 | event.Skip() |
---|
| 318 | |
---|
[d955bf19] | 319 | def onNsfLogo(self, event): |
---|
| 320 | """ |
---|
| 321 | """ |
---|
| 322 | # wxGlade: DialogAbout.<event_handler> |
---|
[41d466f] | 323 | launchBrowser(config._nsf_url) |
---|
| 324 | event.Skip() |
---|
| 325 | |
---|
[d955bf19] | 326 | def onDanseLogo(self, event): |
---|
| 327 | """ |
---|
| 328 | """ |
---|
| 329 | # wxGlade: DialogAbout.<event_handler> |
---|
[41d466f] | 330 | launchBrowser(config._danse_url) |
---|
| 331 | event.Skip() |
---|
| 332 | |
---|
[d955bf19] | 333 | def onUTLogo(self, event): |
---|
| 334 | """ |
---|
| 335 | """ |
---|
| 336 | # wxGlade: DialogAbout.<event_handler> |
---|
[41d466f] | 337 | launchBrowser(config._inst_url) |
---|
| 338 | event.Skip() |
---|
| 339 | |
---|
[657e52c] | 340 | def onIsisLogo(self, event): |
---|
| 341 | """ |
---|
| 342 | """ |
---|
| 343 | # wxGlade: DialogAbout.<event_handler> |
---|
| 344 | launchBrowser(config._isis_url) |
---|
| 345 | event.Skip() |
---|
| 346 | |
---|
| 347 | def onEssLogo(self, event): |
---|
| 348 | """ |
---|
| 349 | """ |
---|
| 350 | # wxGlade: DialogAbout.<event_handler> |
---|
| 351 | launchBrowser(config._ess_url) |
---|
| 352 | event.Skip() |
---|
| 353 | |
---|
| 354 | def onIllLogo(self, event): |
---|
| 355 | """ |
---|
| 356 | """ |
---|
| 357 | # wxGlade: DialogAbout.<event_handler> |
---|
| 358 | launchBrowser(config._ill_url) |
---|
| 359 | event.Skip() |
---|
| 360 | |
---|
[41d466f] | 361 | # end of class DialogAbout |
---|
| 362 | |
---|
| 363 | ##### testing code ############################################################ |
---|
| 364 | class MyApp(wx.App): |
---|
[32c0841] | 365 | """ |
---|
| 366 | """ |
---|
[41d466f] | 367 | def OnInit(self): |
---|
[32c0841] | 368 | """ |
---|
| 369 | """ |
---|
[41d466f] | 370 | wx.InitAllImageHandlers() |
---|
| 371 | dialog = DialogAbout(None, -1, "") |
---|
| 372 | self.SetTopWindow(dialog) |
---|
| 373 | dialog.ShowModal() |
---|
| 374 | dialog.Destroy() |
---|
| 375 | return 1 |
---|
| 376 | |
---|
| 377 | # end of class MyApp |
---|
| 378 | |
---|
| 379 | if __name__ == "__main__": |
---|
| 380 | app = MyApp(0) |
---|
| 381 | app.MainLoop() |
---|
| 382 | |
---|
| 383 | ##### end of testing code ##################################################### |
---|