comparison frontends/src/quick_frontend/quick_contact_list.py @ 1442:6ce18c4e5708

quick_frontend: display over whole alerts counter
author souliane <souliane@mailoo.org>
date Mon, 20 Jul 2015 10:23:58 +0200
parents ba09cd879343
children c74015dc2785
comparison
equal deleted inserted replaced
1441:b4c49c234c6b 1442:6ce18c4e5708
270 self._groups.clear() 270 self._groups.clear()
271 self._specials.clear() 271 self._specials.clear()
272 self._special_extras.clear() 272 self._special_extras.clear()
273 self._roster.clear() 273 self._roster.clear()
274 self._alerts.clear() 274 self._alerts.clear()
275 self.host.updateAlertsCounter()
275 self.update() 276 self.update()
276 277
277 def setContact(self, entity, groups=None, attributes=None, in_roster=False): 278 def setContact(self, entity, groups=None, attributes=None, in_roster=False):
278 """Add a contact to the list if doesn't exist, else update it. 279 """Add a contact to the list if doesn't exist, else update it.
279 280
464 465
465 @param entity(jid.JID): entity which must displayed in alert mode (resource is significant) 466 @param entity(jid.JID): entity which must displayed in alert mode (resource is significant)
466 """ 467 """
467 self._alerts.add(entity) 468 self._alerts.add(entity)
468 self.update() 469 self.update()
470 self.host.updateAlertsCounter()
469 471
470 def removeAlert(self, entity, use_bare_jid=True): 472 def removeAlert(self, entity, use_bare_jid=True):
471 """Eventually remove an alert on the entity (usually for a waiting message). 473 """Eventually remove an alert on the entity (usually for a waiting message).
472 474
473 @param entity(jid.JID): entity (resource is significant) 475 @param entity(jid.JID): entity (resource is significant)
480 to_remove.add(alert_entity) 482 to_remove.add(alert_entity)
481 self._alerts.difference_update(to_remove) 483 self._alerts.difference_update(to_remove)
482 else: 484 else:
483 self._alerts.discard(entity) 485 self._alerts.discard(entity)
484 self.update() 486 self.update()
487 self.host.updateAlertsCounter()
485 488
486 def _showOfflineContacts(self, show_str): 489 def _showOfflineContacts(self, show_str):
487 self.showOfflineContacts(C.bool(show_str)) 490 self.showOfflineContacts(C.bool(show_str))
488 491
489 def showOfflineContacts(self, show): 492 def showOfflineContacts(self, show):