diff frontends/src/primitivus/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 7df0a77a5064
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py	Tue Sep 13 22:19:47 2016 +0200
+++ b/frontends/src/primitivus/chat.py	Thu Sep 15 21:58:35 2016 +0200
@@ -139,7 +139,11 @@
         return markup
 
     # events
-    def updated(self, attributes):
+    def update(self, update_dict=None):
+        """update all the linked message widgets
+
+        @param update_dict(dict, None): key=attribute updated value=new_value
+        """
         self.redraw()
 
 @total_ordering
@@ -212,7 +216,7 @@
         return markup
 
     # events
-    def updated(self, attributes):
+    def update(self, update_dict=None):
         self.redraw()
 
 
@@ -258,8 +262,8 @@
 
 class Chat(PrimitivusWidget, quick_chat.QuickChat):
 
-    def __init__(self, host, target, type_=C.CHAT_ONE2ONE, occupants=None, subject=None, profiles=None):
-        quick_chat.QuickChat.__init__(self, host, target, type_, occupants, subject, profiles=profiles)
+    def __init__(self, host, target, type_=C.CHAT_ONE2ONE, nick=None, occupants=None, subject=None, profiles=None):
+        quick_chat.QuickChat.__init__(self, host, target, type_, nick, occupants, subject, profiles=profiles)
         self.filters = []  # list of filter callbacks to apply
         self.mess_walker = urwid.SimpleListWalker([])
         self.mess_widgets = urwid.ListBox(self.mess_walker)