# HG changeset patch # User souliane # Date 1429197448 -7200 # Node ID e2e75c3c7c7b9d302fc1e7b13c98526c6ef50e35 # Parent 3265a2639182bcc579dff3a9e2b8bb298157edae 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 diff -r 3265a2639182 -r e2e75c3c7c7b INSTALL --- a/INSTALL Thu Apr 16 14:57:57 2015 +0200 +++ b/INSTALL Thu Apr 16 17:17:28 2015 +0200 @@ -41,6 +41,7 @@ ### end sat.conf ### Of course, replace ~/sat/media/destination/path with the actual path you want to use. +Check the wiki for more information about this configuration file: http://wiki.goffi.org/wiki/Configuration/en You should now be able to launch sat: - to launch the backend, enter diff -r 3265a2639182 -r e2e75c3c7c7b frontends/src/primitivus/chat.py --- 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 # diff -r 3265a2639182 -r e2e75c3c7c7b frontends/src/quick_frontend/quick_contact_list.py --- a/frontends/src/quick_frontend/quick_contact_list.py Thu Apr 16 14:57:57 2015 +0200 +++ b/frontends/src/quick_frontend/quick_contact_list.py Thu Apr 16 17:17:28 2015 +0200 @@ -249,6 +249,9 @@ self._cache.clear() self._groups.clear() self._specials.clear() + self._special_extras.clear() + self._roster.clear() + self._alerts.clear() self.update() def setContact(self, entity, groups=None, attributes=None, in_roster=False): diff -r 3265a2639182 -r e2e75c3c7c7b frontends/src/quick_frontend/quick_widgets.py --- a/frontends/src/quick_frontend/quick_widgets.py Thu Apr 16 14:57:57 2015 +0200 +++ b/frontends/src/quick_frontend/quick_widgets.py Thu Apr 16 17:17:28 2015 +0200 @@ -232,9 +232,12 @@ widget_to_delete.onDelete() for widget_map in self._widgets.itervalues(): + to_delete = set() for hash_, widget in widget_map.iteritems(): if widget_to_delete is widget: - del widget_map[hash_] + to_delete.add(hash_) + for hash_ in to_delete: + del widget_map[hash_] class QuickWidget(object): @@ -308,3 +311,6 @@ def onDelete(self): """Called when a widget is deleted""" log.debug(u"deleting widget {}".format(self)) # Must be implemented by frontends + if self.host.selected_widget == self: + self.host.selected_widget = None +