comparison 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
comparison
equal deleted inserted replaced
906:1cbae66fa725 907:cd02f5ef30df
265 full_jid = self.target 265 full_jid = self.target
266 id = self.host.bridge.sendFile(full_jid, filename, {}, self.host.profile) 266 id = self.host.bridge.sendFile(full_jid, filename, {}, self.host.profile)
267 self.host.waitProgress(id, _("File Transfer"), _("Copying %s") % os.path.basename(filename), self.host.profile) 267 self.host.waitProgress(id, _("File Transfer"), _("Copying %s") % os.path.basename(filename), self.host.profile)
268 268
269 def onStartTarot(self, e): 269 def onStartTarot(self, e):
270 debug (_("Starting Tarot game")) 270 debug(_("Starting Tarot game"))
271 warning (_("FIXME: temporary menu, must be changed")) 271 warning(_("FIXME: temporary menu, must be changed"))
272 if len(self.occupants) != 4: 272 if len(self.occupants) != 4:
273 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 273 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
274 err_dlg.ShowModal() 274 err_dlg.ShowModal()
275 else: 275 else:
276 self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile) 276 self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile)
277
278 def updateChatState(self, state, nick=None):
279 """Set the chat state (XEP-0085) of the contact. Leave nick to None
280 to set the state for a one2one conversation, or give a nickname or
281 Const.ALL_OCCUPANTS to set the state of a participant within a MUC.
282 @param state: the new chat state
283 @param nick: None for one2one, the MUC user nick or Const.ALL_OCCUPANTS
284 """
285 #TODO: chat states not implemented yet
286 pass