Mercurial > libervia-backend
diff frontends/src/wix/chat.py @ 907:cd02f5ef30df
primitivus: display chat states (with symbols) for MUC participants
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 17 Mar 2014 13:24:55 +0100 |
parents | 084b52afdceb |
children | 5a6354ff468c |
line wrap: on
line diff
--- a/frontends/src/wix/chat.py Sun Mar 16 21:25:49 2014 +0100 +++ b/frontends/src/wix/chat.py Mon Mar 17 13:24:55 2014 +0100 @@ -267,10 +267,20 @@ self.host.waitProgress(id, _("File Transfer"), _("Copying %s") % os.path.basename(filename), self.host.profile) def onStartTarot(self, e): - debug (_("Starting Tarot game")) - warning (_("FIXME: temporary menu, must be changed")) + debug(_("Starting Tarot game")) + warning(_("FIXME: temporary menu, must be changed")) if len(self.occupants) != 4: err_dlg = wx.MessageDialog(self, _("You need to be exactly 4 peoples in the room to start a Tarot game"), _("Can't start game"), style = wx.OK | wx.ICON_ERROR) #FIXME: gof: temporary only, need to choose the people with who the game has to be started err_dlg.ShowModal() else: self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile) + + def updateChatState(self, state, nick=None): + """Set the chat state (XEP-0085) of the contact. Leave nick to None + to set the state for a one2one conversation, or give a nickname or + Const.ALL_OCCUPANTS to set the state of a participant within a MUC. + @param state: the new chat state + @param nick: None for one2one, the MUC user nick or Const.ALL_OCCUPANTS + """ + #TODO: chat states not implemented yet + pass