Mercurial > traipse_dev
comparison upmana/updatemana.py @ 60:3b2cfa13b610 ornery-dev
Fix to toolbar menus. More correct fix so docking is working on Ubuntu
Fix to three broken nodes. Update Manager is no longer a top window, has an
icon and now has a place on the task bar (panel).
author | sirebral |
---|---|
date | Wed, 12 Aug 2009 20:54:46 -0500 |
parents | 5aff3ef1ae46 |
children | f3d8101211c4 |
comparison
equal
deleted
inserted
replaced
59:5aff3ef1ae46 | 60:3b2cfa13b610 |
---|---|
431 wx.Panel.__init__(self, parent) | 431 wx.Panel.__init__(self, parent) |
432 | 432 |
433 | 433 |
434 class updaterFrame(wx.Frame): | 434 class updaterFrame(wx.Frame): |
435 def __init__(self, parent, title, openrpg, manifest, main): | 435 def __init__(self, parent, title, openrpg, manifest, main): |
436 wx.Frame.__init__(self, None, wx.ID_ANY, title, size=(700,480), | 436 self.dir_struct = open_rpg.get_component("dir_struct") |
437 style=wx.FRAME_NO_TASKBAR | wx.STAY_ON_TOP | wx.DEFAULT_FRAME_STYLE) | 437 |
438 wx.Frame.__init__(self, None, wx.ID_ANY, title, size=(700,480), style=wx.DEFAULT_FRAME_STYLE) | |
439 if wx.Platform == '__WXMSW__': icon = wx.Icon(self.dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO) | |
440 else: icon = wx.Icon(self.dir_struct["icon"]+"d20.xpm", wx.BITMAP_TYPE_XPM ) | |
441 self.SetIcon(icon) | |
442 | |
438 self.CenterOnScreen() | 443 self.CenterOnScreen() |
439 | |
440 self.main = main | 444 self.main = main |
441 ####### Panel Stuff ###### | 445 ####### Panel Stuff ###### |
442 p = wx.Panel(self) | 446 p = wx.Panel(self) |
443 nb = wx.Notebook(p) | 447 nb = wx.Notebook(p) |
444 | 448 |
461 p.SetSizer(sizer) | 465 p.SetSizer(sizer) |
462 self.Bind(wx.EVT_CLOSE, self.OnClose) | 466 self.Bind(wx.EVT_CLOSE, self.OnClose) |
463 | 467 |
464 def OnClose(self, event): | 468 def OnClose(self, event): |
465 if self.main == False: self.Destroy() | 469 if self.main == False: self.Destroy() |
466 if self.main == True: self.Hide() #self.Hide() | 470 if self.main == True: self.Hide() |
467 #continue | 471 |
468 | 472 |
469 class updateApp(wx.App): | 473 class updateApp(wx.App): |
470 def OnInit(self): | 474 def OnInit(self): |
471 self.open_rpg = open_rpg | 475 self.open_rpg = open_rpg |
472 self.main = False | 476 self.main = False |