comparison src/browser/libervia_main.py @ 483:0bbbef1d53a8

server side (blog): use user's avatar a the blog's favicon + small refactorization
author souliane <souliane@mailoo.org>
date Tue, 17 Jun 2014 16:21:42 +0200
parents 437eefa53a01
children 5d8632a7bfde
comparison
equal deleted inserted replaced
482:437eefa53a01 483:0bbbef1d53a8
805 def _newContactCb(self, contact_jid, attributes, groups): 805 def _newContactCb(self, contact_jid, attributes, groups):
806 self.contact_panel.updateContact(contact_jid, attributes, groups) 806 self.contact_panel.updateContact(contact_jid, attributes, groups)
807 807
808 def _entityDataUpdatedCb(self, entity_jid_s, key, value): 808 def _entityDataUpdatedCb(self, entity_jid_s, key, value):
809 if key == "avatar": 809 if key == "avatar":
810 avatar = '/avatars/%s' % value 810 avatar = '/' + C.AVATARS_DIR + value
811
812 self.avatars_cache[entity_jid_s] = avatar 811 self.avatars_cache[entity_jid_s] = avatar
813 self.contact_panel.updateAvatar(entity_jid_s, avatar) 812 self.contact_panel.updateAvatar(entity_jid_s, avatar)
814 813
815 for lib_wid in self.libervia_widgets: 814 for lib_wid in self.libervia_widgets:
816 if isinstance(lib_wid, panels.MicroblogPanel): 815 if isinstance(lib_wid, panels.MicroblogPanel):