Mercurial > libervia-backend
diff frontends/src/wix/contact_list.py @ 366:0806a65a5fa9
wix: updated paths to use media_dir
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 18 Jun 2011 22:51:33 +0200 |
parents | 3a21d586dae4 |
children | cf005701624b |
line wrap: on
line diff
--- a/frontends/src/wix/contact_list.py Sat Jun 18 17:56:59 2011 +0200 +++ b/frontends/src/wix/contact_list.py Sat Jun 18 22:51:33 2011 +0200 @@ -24,6 +24,7 @@ from logging import debug, info, error from cgi import escape from sat.tools.jid import JID +from os.path import join class Group(unicode): @@ -48,6 +49,7 @@ self.type = type self.__typeSwitch() self.groups = {} #list contacts in each groups, key = group + self.empty_avatar = join(host.media_dir, 'misc/empty_avatar') self.Bind(wx.EVT_LISTBOX, self.onSelected) self.Bind(wx.EVT_LISTBOX_DCLICK, self.onActivated) @@ -114,7 +116,7 @@ #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' #XXX: there is a weird bug here: if the image has an extension (i.e. empty_avatar.png), + avatar = self.CM.getAttr(jid,'avatar') or self.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