comparison upmana/updatemana.py @ 75:f518bc709fd1 ornery-dev

Continuing refinement and clean-up. Nearly done.
author sirebral
date Fri, 21 Aug 2009 21:49:42 -0500
parents fdcca00696ea
children 57887ab0df51
comparison
equal deleted inserted replaced
74:fdcca00696ea 75:f518bc709fd1
1 import wx 1 import wx
2 import sys
3 import os #just .sep maybe
2 import manifest 4 import manifest
3 import shutil 5 import shutil
4 from orpg.orpgCore import component 6 from orpg.orpgCore import component
5 from orpg.dirpath import dir_struct 7 from orpg.dirpath import dir_struct
6 from orpg.tools.orpg_log import logger 8 from orpg.tools.orpg_log import logger
19 self.ui = ui.ui() 21 self.ui = ui.ui()
20 self.repo = hg.repository(self.ui, ".") 22 self.repo = hg.repository(self.ui, ".")
21 self.c = self.repo.changectx('tip') 23 self.c = self.repo.changectx('tip')
22 self.manifest = manifest 24 self.manifest = manifest
23 self.parent = parent 25 self.parent = parent
24 logger.debug("Enter updaterFrame")
25 self.SetBackgroundColour(wx.WHITE) 26 self.SetBackgroundColour(wx.WHITE)
26 self.sizer = wx.GridBagSizer(hgap=1, vgap=1) 27 self.sizer = wx.GridBagSizer(hgap=1, vgap=1)
27 self.changelog = wx.TextCtrl(self, wx.ID_ANY, size=(325, -1), style=wx.TE_MULTILINE | wx.TE_READONLY) 28 self.changelog = wx.TextCtrl(self, wx.ID_ANY, size=(325, -1), style=wx.TE_MULTILINE | wx.TE_READONLY)
28 self.filelist = wx.TextCtrl(self, wx.ID_ANY, size=(275, 300), style=wx.TE_MULTILINE | wx.TE_READONLY) 29 self.filelist = wx.TextCtrl(self, wx.ID_ANY, size=(275, 300), style=wx.TE_MULTILINE | wx.TE_READONLY)
29 self.buttons = {} 30 self.buttons = {}
559 560
560 class updateApp(wx.App): 561 class updateApp(wx.App):
561 def OnInit(self): 562 def OnInit(self):
562 self.main = False 563 self.main = False
563 logger._set_log_to_console(False) 564 logger._set_log_to_console(False)
564 logger.note(Updater Start", ORPG_NOTE) 565 logger.note("Updater Start")
565 self.manifest = manifest.ManifestChanges() 566 self.manifest = manifest.ManifestChanges()
566 component.add('validate', validate) 567 component.add('validate', validate)
567 self.updater = updaterFrame(self, "OpenRPG Update Manager 0.7.2 (open beta)", 568 self.updater = updaterFrame(self, "OpenRPG Update Manager 0.7.2 (open beta)",
568 component, self.manifest, self.main) 569 component, self.manifest, self.main)
569 if self.manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False: 570 if self.manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False: