wix: updated paths to use media_dir
This commit is contained in:
parent
7f1a741caa
commit
796eb4bd6a
1 changed files with 9 additions and 7 deletions
|
|
@ -24,6 +24,7 @@ from sat_frontends.quick_frontend.quick_contact_list import QuickContactList
|
|||
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 @@ class ContactList(wx.SimpleHtmlListBox, QuickContactList):
|
|||
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 @@ class ContactList(wx.SimpleHtmlListBox, QuickContactList):
|
|||
#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
|
||||
|
|
|
|||
Loading…
Reference in a new issue