quick_frontend, primitivus: fixes a couple of issues:

- chat: notification was raising an error when you just entered the room and self.nick is None
    - quick_widget: deleting a widget was modifying a dict while looping on it + unselect widget when it's being deleted
This commit is contained in:
souliane 2015-04-16 17:17:28 +02:00
commit 2203e6aa52

View file

@ -365,7 +365,7 @@ class Chat(PrimitivusWidget, QuickChat):
if not self.host.x_notify.hasFocus():
if self.type == C.CHAT_ONE2ONE:
self.host.x_notify.sendNotification(_("Primitivus: %s is talking to you") % from_jid)
elif self.nick.lower() in msg.lower():
elif self.nick is not None and self.nick.lower() in msg.lower():
self.host.x_notify.sendNotification(_("Primitivus: %(user)s mentioned you in room '%(room)s'") % {'user': from_jid, 'room': self.target})
# MENU EVENTS #