diff frontends/src/primitivus/chat.py @ 1410:e2e75c3c7c7b

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
author souliane <souliane@mailoo.org>
date Thu, 16 Apr 2015 17:17:28 +0200
parents 069ad98b360d
children 641cfd2faefe
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py	Thu Apr 16 14:57:57 2015 +0200
+++ b/frontends/src/primitivus/chat.py	Thu Apr 16 17:17:28 2015 +0200
@@ -365,7 +365,7 @@
         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 #