# HG changeset patch # User Goffi # Date 1474663813 -7200 # Node ID 529a6d7f7f6ad849f958a413bb0a571c34e9bdfb # Parent 4f3ebf786fbccb9c4d369afc6a53ed3258a45ca9 quick frontend (chat): update use a dict diff -r 4f3ebf786fbc -r 529a6d7f7f6a frontends/src/quick_frontend/quick_chat.py --- a/frontends/src/quick_frontend/quick_chat.py Thu Sep 15 21:58:35 2016 +0200 +++ b/frontends/src/quick_frontend/quick_chat.py Fri Sep 23 22:50:13 2016 +0200 @@ -142,7 +142,7 @@ def status(self, status): self._status = status for w in self.widgets: - w.update(["status"]) + w.update({"status": None}) def handleMe(self): """Check if messages starts with "/me " and change them if it is the case @@ -212,7 +212,7 @@ def state(self, new_state): self._state = new_state for w in self.widgets: - w.update(["state"]) + w.update({"state":None}) def update(self, update_dict=None): for w in self.widgets: @@ -573,11 +573,11 @@ def onAvatar(self, entity, filename, profile): if self.type == C.CHAT_GROUP: if entity.bare == self.target and entity.resource in self.occupants: - self.occupants[entity.resource].update(['avatar']) + self.occupants[entity.resource].update({'avatar': filename}) for m in self.messages.values(): if m.nick == entity.resource: for w in m.widgets: - w.update('avatar', filename) + w.update({'avatar': filename}) else: if entity.bare == self.target.bare: log.info("entity avatar updated")