Mercurial > libervia-backend
diff frontends/src/primitivus/chat.py @ 1377:017270e6eea4
quick_frontends, primitivus: know who are the MUC occupants from the presence informations:
- QuickChat.occupants is now a property using cached information
- some MUC handlers are no more needed, the presence handler is enough
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 20 Mar 2015 16:25:38 +0100 |
parents | d3e9848b9574 |
children | 3dae6964c071 |
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py Thu Mar 19 20:40:10 2015 +0100 +++ b/frontends/src/primitivus/chat.py Fri Mar 20 16:25:38 2015 +0100 @@ -226,19 +226,10 @@ self.chat_widget.header = urwid.AttrMap(self.subj_wid,'title') self.host.redraw() - def setPresents(self, nicks): - """Set the occupants of a group chat. - - @param nicks (list[unicode]): sorted list of nicknames - """ - QuickChat.setPresents(self, nicks) - self.present_wid.changeValues(nicks) - self.host.redraw() - - def replaceUser(self, param_nick, show_info=True): + def addUser(self, param_nick): """Add user if it is not in the group list""" nick = unicode(param_nick) #FIXME: should be done in DBus bridge - QuickChat.replaceUser(self, nick, show_info) + QuickChat.addUser(self, nick) presents = self.present_wid.getAllValues() if nick not in [present.value for present in presents]: presents.append(nick) @@ -246,10 +237,10 @@ self.present_wid.changeValues(presents) self.host.redraw() - def removeUser(self, param_nick, show_info=True): + def removeUser(self, param_nick): """Remove a user from the group list""" nick = unicode(param_nick) #FIXME: should be done in DBus bridge - QuickChat.removeUser(self, nick, show_info) + QuickChat.removeUser(self, nick) self.present_wid.deleteValue(nick) self.host.redraw()