diff 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
line wrap: on
line diff
--- a/upmana/updatemana.py	Tue Aug 11 17:48:30 2009 -0500
+++ b/upmana/updatemana.py	Wed Aug 12 20:54:46 2009 -0500
@@ -433,10 +433,14 @@
 
 class updaterFrame(wx.Frame):
     def __init__(self, parent, title, openrpg, manifest, main):
-        wx.Frame.__init__(self, None, wx.ID_ANY, title, size=(700,480), 
-            style=wx.FRAME_NO_TASKBAR | wx.STAY_ON_TOP | wx.DEFAULT_FRAME_STYLE)
+        self.dir_struct = open_rpg.get_component("dir_struct")
+
+        wx.Frame.__init__(self, None, wx.ID_ANY, title, size=(700,480), style=wx.DEFAULT_FRAME_STYLE)
+        if wx.Platform == '__WXMSW__': icon = wx.Icon(self.dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO)
+        else: icon = wx.Icon(self.dir_struct["icon"]+"d20.xpm", wx.BITMAP_TYPE_XPM )
+        self.SetIcon(icon)
+
         self.CenterOnScreen()
-
         self.main = main
         ####### Panel Stuff ######
         p = wx.Panel(self)
@@ -463,8 +467,8 @@
 
     def OnClose(self, event):
         if self.main == False: self.Destroy()
-        if self.main == True: self.Hide() #self.Hide()
-        #continue
+        if self.main == True: self.Hide()
+
 
 class updateApp(wx.App):
     def OnInit(self):
@@ -478,7 +482,7 @@
         self.open_rpg.add_component("xml", orpg.orpg_xml)
         self.open_rpg.add_component("dir_struct", orpg.dirpath.dir_struct)
         self.validate = upmana.validate.Validate()
-        self.open_rpg.add_component("validate", self.validate)
+        self.open_rpg.add_component("validate", self.validate)
         self.updater = updaterFrame(self, "OpenRPG Update Manager 0.7.1 (open beta)", self.open_rpg, self.manifest, self.main)
         if self.manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False:
             self.AutoUpdate(); self.OnExit()