comparison frontends/src/quick_frontend/quick_app.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 e27963c9c219
children 9fce331ba0fd
comparison
equal deleted inserted replaced
1441:b4c49c234c6b 1442:6ce18c4e5708
276 @property 276 @property
277 def visible_widgets(self): 277 def visible_widgets(self):
278 """widgets currently visible (must be implemented by frontend)""" 278 """widgets currently visible (must be implemented by frontend)"""
279 raise NotImplementedError 279 raise NotImplementedError
280 280
281 @property
282 def alerts_count(self):
283 """Count the over whole alerts for all contact lists"""
284 return sum([len(clist._alerts) for clist in self.contact_lists.values()])
285
281 def registerSignal(self, function_name, handler=None, iface="core", with_profile=True): 286 def registerSignal(self, function_name, handler=None, iface="core", with_profile=True):
282 """Register a handler for a signal 287 """Register a handler for a signal
283 288
284 @param function_name (str): name of the signal to handle 289 @param function_name (str): name of the signal to handle
285 @param handler (instancemethod): method to call when the signal arrive, None for calling an automatically named handler (function_name + 'Handler') 290 @param handler (instancemethod): method to call when the signal arrive, None for calling an automatically named handler (function_name + 'Handler')
636 raise NotImplementedError 641 raise NotImplementedError
637 642
638 def showAlert(self, message): 643 def showAlert(self, message):
639 pass #FIXME 644 pass #FIXME
640 645
646 def updateAlertsCounter(self):
647 """Update the over whole alerts counter
648
649 """
650 pass
651
641 def paramUpdateHandler(self, name, value, namespace, profile): 652 def paramUpdateHandler(self, name, value, namespace, profile):
642 log.debug(_(u"param update: [%(namespace)s] %(name)s = %(value)s") % {'namespace': namespace, 'name': name, 'value': value}) 653 log.debug(_(u"param update: [%(namespace)s] %(name)s = %(value)s") % {'namespace': namespace, 'name': name, 'value': value})
643 if (namespace, name) == ("Connection", "JabberID"): 654 if (namespace, name) == ("Connection", "JabberID"):
644 log.debug(_(u"Changing JID to %s") % value) 655 log.debug(_(u"Changing JID to %s") % value)
645 self.profiles[profile].whoami = jid.JID(value) 656 self.profiles[profile].whoami = jid.JID(value)