comparison frontends/src/primitivus/primitivus @ 1124:7ee18dbfb661

primitivus: improve the check to alert for new message
author souliane <souliane@mailoo.org>
date Sun, 24 Aug 2014 18:23:55 +0200
parents 5968fd8d2248
children d6c3fea5ecfe
comparison
equal deleted inserted replaced
1123:e89bd3a26c86 1124:7ee18dbfb661
403 if not from_jid in self.contact_list and from_jid.bare != self.profiles[profile]['whoami'].bare: 403 if not from_jid in self.contact_list and from_jid.bare != self.profiles[profile]['whoami'].bare:
404 #XXX: needed to show entities which haven't sent any 404 #XXX: needed to show entities which haven't sent any
405 # presence information and which are not in roster 405 # presence information and which are not in roster
406 self.contact_list.replace(from_jid, [C.GROUP_NOT_IN_ROSTER]) 406 self.contact_list.replace(from_jid, [C.GROUP_NOT_IN_ROSTER])
407 407
408 if JID(self.contact_list.selected).bare != from_jid.bare: 408 if self.contact_list.selected is None or JID(self.contact_list.selected).bare != from_jid.bare:
409 self.contact_list.putAlert(from_jid) 409 self.contact_list.putAlert(from_jid)
410 410
411 def _dialogOkCb(self, widget, data): 411 def _dialogOkCb(self, widget, data):
412 self.removePopUp() 412 self.removePopUp()
413 answer_cb = data[0] 413 answer_cb = data[0]