diff frontends/src/quick_frontend/quick_chat.py @ 2075:4f3ebf786fbc

quick_frontend, primitivus (chat): renamed updated to update, using a dict as argument + fixed Primitivus group chat
author Goffi <goffi@goffi.org>
date Thu, 15 Sep 2016 21:58:35 +0200
parents 7834743705f0
children 529a6d7f7f6a
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_chat.py	Tue Sep 13 22:19:47 2016 +0200
+++ b/frontends/src/quick_frontend/quick_chat.py	Thu Sep 15 21:58:35 2016 +0200
@@ -142,7 +142,7 @@
     def status(self, status):
         self._status = status
         for w in self.widgets:
-            w.updated(["status"])
+            w.update(["status"])
 
     def handleMe(self):
         """Check if messages starts with "/me " and change them if it is the case
@@ -212,11 +212,11 @@
     def state(self, new_state):
         self._state = new_state
         for w in self.widgets:
-            w.updated(["state"])
+            w.update(["state"])
 
-    def update(self, key=None):
+    def update(self, update_dict=None):
         for w in self.widgets:
-            w.update(key)
+            w.update(update_dict)
 
 
 class QuickChat(quick_widgets.QuickWidget):
@@ -573,7 +573,7 @@
     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'])
                 for m in self.messages.values():
                     if m.nick == entity.resource:
                         for w in m.widgets: