# HG changeset patch # User chewie@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1237814467 0 # Node ID 2959ed343fde4f58e20dbffb67cc6bc876f9340e # Parent f10a35efebc0ead2b7689b9dbe03bbbdcc22a7c4 - small fix for the TextField widget - it's setText() method lacked utf8 conversion via _text2gui() NOTE: - UH chat gui should now init without crashing diff -r f10a35efebc0 -r 2959ed343fde engine/extensions/pychan/widgets.py --- a/engine/extensions/pychan/widgets.py Mon Mar 23 02:06:14 2009 +0000 +++ b/engine/extensions/pychan/widgets.py Mon Mar 23 13:21:07 2009 +0000 @@ -1631,7 +1631,7 @@ ATTRIBUTES = Widget.ATTRIBUTES + [UnicodeAttr('text')] - def __init__(self,text="", **kwargs): + def __init__(self,text=u"", **kwargs): self.real_widget = fife.TextField() self.text = text super(TextField,self).__init__(**kwargs) @@ -1648,7 +1648,7 @@ self.width = max_w self.height = (self.real_font.getHeight() + 2) def _getText(self): return self.real_widget.getText() - def _setText(self,text): self.real_widget.setText(text) + def _setText(self,text): self.real_widget.setText(_text2gui(text)) text = property(_getText,_setText) def _setOpaque(self,opaque): self.real_widget.setOpaque(opaque)