Mercurial > traipse_dev
diff orpg/chat/chatwnd.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 | 449a8900f9ac |
children | 2fa8bd6785a5 |
line wrap: on
line diff
--- a/orpg/chat/chatwnd.py Sat Aug 22 05:29:56 2009 -0500 +++ b/orpg/chat/chatwnd.py Sun Aug 23 14:57:06 2009 -0500 @@ -148,7 +148,8 @@ # !id : @debugging def __init__(self, parent, id): - wx.html.HtmlWindow.__init__(self, parent, id, style=wx.SUNKEN_BORDER | wx.html.HW_SCROLLBAR_AUTO|wx.NO_FULL_REPAINT_ON_RESIZE) + wx.html.HtmlWindow.__init__(self, parent, id, + style=wx.SUNKEN_BORDER|wx.html.HW_SCROLLBAR_AUTO|wx.NO_FULL_REPAINT_ON_RESIZE) self.parent = parent self.build_menu() self.Bind(wx.EVT_LEFT_UP, self.LeftUp) @@ -237,10 +238,8 @@ @debugging def __init__(self, parent, id): wx.webview.WebView.__init__(self, parent, id) - self.parent = parent self.__font = wx.Font(10, wx.FONTFAMILY_ROMAN, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, faceName='Ariel') - self.build_menu() self.Bind(wx.EVT_LEFT_UP, self.LeftUp) self.Bind(wx.EVT_RIGHT_DOWN, self.onPopup) @@ -265,7 +264,9 @@ @debugging def SetDefaultFontAndSize(self, fontname, fontsize): - self.__font = wx.Font(int(fontsize), wx.FONTFAMILY_ROMAN, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, faceName=fontname) + self.__font = wx.Font(int(fontsize), + wx.FONTFAMILY_ROMAN, wx.FONTSTYLE_NORMAL, + wx.FONTWEIGHT_NORMAL, faceName=fontname) try: self.SetPageSource(self.Header() + self.StripHeader()) except Exception, e: print e return (self.GetFont().GetFaceName(), self.GetFont().GetPointSize()) @@ -374,8 +375,7 @@ self.Bind(FNB.EVT_FLATNOTEBOOK_PAGE_CHANGING, self.onPageChanging) self.Bind(FNB.EVT_FLATNOTEBOOK_PAGE_CLOSING, self.onCloseTab) # html font/fontsize is global to all the notebook tabs. - self.font, self.fontsize = self.MainChatPanel.chatwnd.SetDefaultFontAndSize(self.settings.get_setting('defaultfont'), - self.settings.get_setting('defaultfontsize')) + self.font, self.fontsize = self.MainChatPanel.chatwnd.SetDefaultFontAndSize(self.settings.get_setting('defaultfont'), self.settings.get_setting('defaultfontsize')) self.GMChatPanel = None if self.settings.get_setting("GMWhisperTab") == '1': self.create_gm_tab() @@ -524,7 +524,8 @@ @debugging def __init__(self, parent, id, tab_type, sendtarget): - wx.Panel.__init__(self, parent, id) + wx.Panel.__init__(self, parent, id) + logger._set_log_to_console(False) self.session = component.get('session') self.settings = component.get('settings') self.activeplugins = component.get('plugins') @@ -572,7 +573,8 @@ @debugging def set_default_font(self, fontname=None, fontsize=None): - """Set all chatpanels to new default fontname/fontsize. Returns current font settings in a (fontname, fontsize) tuple.""" + """Set all chatpanels to new default fontname/fontsize. + Returns current font settings in a (fontname, fontsize) tuple.""" if (fontname is not None): newfont = fontname else: newfont = self.font if (fontsize is not None): newfontsize = int(fontsize) @@ -1291,7 +1293,7 @@ ## END elif event.GetKeyCode() == wx.WXK_END: - logger.debug("event.GetKeyCode() == wx.WXK_END", ORPG_DEBUG) + logger.debug("event.GetKeyCode() == wx.WXK_END") if self.lockscroll: self.lock_scroll(0) self.Post() @@ -1299,7 +1301,7 @@ ## NOTHING else: event.Skip() - logger.debug("Exit chat_panel->OnChar(self, event)", ORPG_DEBUG) + logger.debug("Exit chat_panel->OnChar(self, event)") # def OnChar - end @debugging