Mercurial > traipse_dev
diff orpg/main.py @ 79:dd4be4817377 ornery-dev
Chat Window no longer prints excessive debug statements to console. Renamed the Update Manager menu item to Traipse Suite. Added debug console to Traipse Suite. Log now prints an error report and waits for user input so Windows users can see the error being reported.
author | sirebral |
---|---|
date | Sun, 23 Aug 2009 14:57:06 -0500 |
parents | fdcca00696ea |
children | bdbeafcb2ef4 68c7bd272f27 |
line wrap: on
line diff
--- a/orpg/main.py Sat Aug 22 05:29:56 2009 -0500 +++ b/orpg/main.py Sun Aug 23 14:57:06 2009 -0500 @@ -57,7 +57,7 @@ from orpg.tools.orpg_settings import settings from orpg.tools.validate import validate from orpg.tools.passtool import PassTool -from orpg.tools.orpg_log import logger +from orpg.tools.orpg_log import logger, crash from orpg.tools.decorators import debugging from orpg.tools.metamenus import MenuBarEx @@ -137,6 +137,11 @@ logger.debug("update manager reloaded") self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) + #Load Update Manager + component.add('debugconsole', self.debugger) + logger.debug("debugger window") + self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) + @debugging def post_show_init(self): """Some Actions need to be done after the main fram is drawn""" @@ -255,12 +260,17 @@ self.pluginMenu.AppendSeparator() self.mainmenu.Insert(2, self.pluginMenu, "&Plugins") - self.updateMana = wx.Menu() - mana = wx.MenuItem(self.updateMana, wx.ID_ANY, "Update Manager", "Update Manager") + # Traipse Suite of Additions. + self.traipseSuite = wx.Menu() + self.mainmenu.Insert(5, self.traipseSuite, "&Traipse Suite") + + mana = wx.MenuItem(self.traipseSuite, wx.ID_ANY, "Update Manager", "Update Manager") self.Bind(wx.EVT_MENU, self.OnMB_UpdateManagerPanel, mana) + self.traipseSuite.AppendItem(mana) - self.updateMana.AppendItem(mana) - self.mainmenu.Insert(5, self.updateMana, "&Update Manager") + debugger = wx.MenuItem(self.traipseSuite, -1, "Debug Console", "Debug Console") + self.Bind(wx.EVT_MENU, self.OnMB_DebugConsole, debugger) + self.traipseSuite.AppendItem(debugger) ################################# @@ -463,6 +473,11 @@ else: self.updateMana.Show() @debugging + def OnMB_DebugConsole(self, evt): + if self.debugger.IsShown() == True: self.debugger.Hide() + else: self.debugger.Show() + + @debugging def OnMB_ToolsLoggingLevelDebug(self): lvl = logger.log_level if self.mainmenu.GetMenuState("ToolsLoggingLevelDebug"): lvl |= ORPG_DEBUG @@ -640,6 +655,18 @@ self.SetDimensions(posx, posy, w, h) logger.debug("Dimensions Set") + #Update Manager + self.manifest = manifest.ManifestChanges() + self.debugger = orpg.tools.orpg_log.DebugConsole(self) + logger.debug("Menu Created") + h = int(xml_dom.getAttribute("height")) + w = int(xml_dom.getAttribute("width")) + posx = int(xml_dom.getAttribute("posx")) + posy = int(xml_dom.getAttribute("posy")) + maximized = int(xml_dom.getAttribute("maximized")) + self.SetDimensions(posx, posy, w, h) + logger.debug("Dimensions Set") + # Sound Manager self.sound_player = orpg.tools.orpg_sound.orpgSound(self) component.add("sound", self.sound_player)