changeset 233:2959ed343fde

- small fix for the TextField widget - it's setText() method lacked utf8 conversion via _text2gui() NOTE: - UH chat gui should now init without crashing
author chewie@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 23 Mar 2009 13:21:07 +0000
parents f10a35efebc0
children e4dfdf4c11fd
files engine/extensions/pychan/widgets.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)