# HG changeset patch # User Goffi # Date 1304347867 -7200 # Node ID 3a21d586dae4cdc320ae726d2a3e5c484c93dc6b # Parent 31804aa9d3da990eaee591ef62faf20038086b6b wix: workaround a weird bug which crash wix while using empty_avatar, see comments for more information diff -r 31804aa9d3da -r 3a21d586dae4 frontends/src/wix/contact_list.py --- a/frontends/src/wix/contact_list.py Mon May 02 16:45:27 2011 +0200 +++ b/frontends/src/wix/contact_list.py Mon May 02 16:51:07 2011 +0200 @@ -114,7 +114,10 @@ #show[2]==color (or None) show_html = "[%s]" % (show[2], show[1]) if show[2] else "" status = self.CM.getAttr(jid,'status') or '' - avatar = self.CM.getAttr(jid,'avatar') or IMAGE_DIR+'/empty_avatar.png' + avatar = self.CM.getAttr(jid,'avatar') or IMAGE_DIR+'/empty_avatar' #XXX: there is a weird bug here: if the image has an extension (i.e. empty_avatar.png), + #WxPython segfault, and it doesn't without nothing. I couldn't reproduce the case with a basic test script, so it need further investigation before reporting it + #to WxPython dev. Anyway, the program crash with a segfault, not a python exception, so there is definitely something wrong with WxPython. + #The case seems to happen when SimpleHtmlListBox parse the HTML with the tag html = """ @@ -150,7 +153,7 @@ gp_idx = self.Append(self.__presentGroup(group), Group(group)) else: gp_idx = indexes[0] - + self.Insert(self.__presentItem(contact), gp_idx+1, contact) diff -r 31804aa9d3da -r 3a21d586dae4 frontends/src/wix/images/empty_avatar Binary file frontends/src/wix/images/empty_avatar has changed diff -r 31804aa9d3da -r 3a21d586dae4 frontends/src/wix/images/empty_avatar.png Binary file frontends/src/wix/images/empty_avatar.png has changed