changeset 316:3a21d586dae4

wix: workaround a weird bug which crash wix while using empty_avatar, see comments for more information
author Goffi <goffi@goffi.org>
date Mon, 02 May 2011 16:51:07 +0200
parents 31804aa9d3da
children f1f7c94278f2
files frontends/src/wix/contact_list.py frontends/src/wix/images/empty_avatar frontends/src/wix/images/empty_avatar.png
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 = "<font color='%s'>[%s]</font>" % (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 <img> tag
         
         html = """
         <table border='0'>
@@ -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)
 
 
Binary file frontends/src/wix/images/empty_avatar has changed
Binary file frontends/src/wix/images/empty_avatar.png has changed