Mercurial > traipse_dev
diff orpg/chat/chatwnd.py @ 82:2fa8bd6785a5 ornery-dev
TerminalWriter's colors are nice, but if no debug console is open it causes the software to look for one until a recursion error is created. Crash reports are sent to the debug console and a pop-up tells the user one has happened. Fix to chat window from SnowDog.
author | sirebral |
---|---|
date | Thu, 27 Aug 2009 00:51:22 -0500 |
parents | dd4be4817377 |
children | eb1b275699c4 |
line wrap: on
line diff
--- a/orpg/chat/chatwnd.py Wed Aug 26 23:24:45 2009 -0500 +++ b/orpg/chat/chatwnd.py Thu Aug 27 00:51:22 2009 -0500 @@ -66,6 +66,7 @@ from HTMLParser import HTMLParser import chat_util import traceback +from wx.lib.expando import EVT_ETC_LAYOUT_NEEDED from orpg.tools.validate import validate from orpg.tools.orpg_settings import settings @@ -557,11 +558,9 @@ self.advancedFilter = False self.lastSend = 0 # this is used to help implement the player typing indicator self.lastPress = 0 # this is used to help implement the player typing indicator - self.Bind(wx.EVT_SIZE, self.OnSize) + self.Bind(wx.EVT_SIZE, self.OnSize) + self.Bind(EVT_ETC_LAYOUT_NEEDED, self.OnSize) #require to keep text at bottom of chat when text entry expands --SD self.build_ctrls() - #openrpg dir - #self.root_dir = dir_struct["home"] #Removing! - # html font/fontsize is global to all the notebook tabs. StartupFont = self.settings.get_setting("defaultfont") StartupFontSize = self.settings.get_setting("defaultfontsize") if(StartupFont != "") and (StartupFontSize != ""): @@ -569,7 +568,7 @@ except: pass self.font = self.chatwnd.GetFont().GetFaceName() self.fontsize = self.chatwnd.GetFont().GetPointSize() - self.scroll_down() + self.scroll_down() @debugging def set_default_font(self, fontname=None, fontsize=None):