comparison 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
comparison
equal deleted inserted replaced
1409:3265a2639182 1410:e2e75c3c7c7b
363 self.text_list.focus_position = len(self.content) - 1 363 self.text_list.focus_position = len(self.content) - 1
364 self.host.redraw() 364 self.host.redraw()
365 if not self.host.x_notify.hasFocus(): 365 if not self.host.x_notify.hasFocus():
366 if self.type == C.CHAT_ONE2ONE: 366 if self.type == C.CHAT_ONE2ONE:
367 self.host.x_notify.sendNotification(_("Primitivus: %s is talking to you") % from_jid) 367 self.host.x_notify.sendNotification(_("Primitivus: %s is talking to you") % from_jid)
368 elif self.nick.lower() in msg.lower(): 368 elif self.nick is not None and self.nick.lower() in msg.lower():
369 self.host.x_notify.sendNotification(_("Primitivus: %(user)s mentioned you in room '%(room)s'") % {'user': from_jid, 'room': self.target}) 369 self.host.x_notify.sendNotification(_("Primitivus: %(user)s mentioned you in room '%(room)s'") % {'user': from_jid, 'room': self.target})
370 370
371 # MENU EVENTS # 371 # MENU EVENTS #
372 def onTarotRequest(self, menu): 372 def onTarotRequest(self, menu):
373 # TODO: move this to plugin_misc_tarot with dynamic menu 373 # TODO: move this to plugin_misc_tarot with dynamic menu