changeset 2076:529a6d7f7f6a

quick frontend (chat): update use a dict
author Goffi <goffi@goffi.org>
date Fri, 23 Sep 2016 22:50:13 +0200
parents 4f3ebf786fbc
children 95ad70ad815c
files frontends/src/quick_frontend/quick_chat.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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")