comparison src/browser/sat_browser/contact_list.py @ 673:e489218886d7 frontends_multi_profiles

browser_side: add attribute "merge_resources" to ContactsPanel to display the MUC occupants + override Chat.replaceUser and Chat.removeUser
author souliane <souliane@mailoo.org>
date Wed, 11 Mar 2015 19:01:27 +0100
parents 2201ff543a05
children a90cc8fc9605
comparison
equal deleted inserted replaced
672:b39a9eddfe56 673:e489218886d7
407 """Tell if the given group actually has visible members 407 """Tell if the given group actually has visible members
408 408
409 @param group (unicode): the group to check 409 @param group (unicode): the group to check
410 @return: boolean 410 @return: boolean
411 """ 411 """
412 raise Exception # FIXME: remove this method 412 raise Exception # FIXME: remove this method
413 for jid_ in self.groups[group]: 413 for jid_ in self.groups[group]:
414 if self._contacts_panel.getContactBox(jid_).isVisible(): 414 if self._contacts_panel.getContactBox(jid_).isVisible():
415 return True 415 return True
416 return False 416 return False
417 417
432 def onPresenceUpdate(self, entity, show, priority, statuses, profile): 432 def onPresenceUpdate(self, entity, show, priority, statuses, profile):
433 QuickContactList.onPresenceUpdate(self, entity, show, priority, statuses, profile) 433 QuickContactList.onPresenceUpdate(self, entity, show, priority, statuses, profile)
434 entity_bare = entity.bare 434 entity_bare = entity.bare
435 show = self.getCache(entity_bare, C.PRESENCE_SHOW) # we use cache to have the show nformation of main resource only 435 show = self.getCache(entity_bare, C.PRESENCE_SHOW) # we use cache to have the show nformation of main resource only
436 self._contacts_panel.setState(entity_bare, "availability", show) 436 self._contacts_panel.setState(entity_bare, "availability", show)
437 self.update() 437 self.update() # FIXME: should update the list without rebuilding it all
438 438
439 # def updateVisibility(self, jids, groups): 439 # def updateVisibility(self, jids, groups):
440 # """Set the widgets visibility for the given contacts and groups 440 # """Set the widgets visibility for the given contacts and groups
441 441
442 # @param jids (list[unicode]): list of JID 442 # @param jids (list[unicode]): list of JID