primitivus: display chat states (with symbols) for MUC participants

This commit is contained in:
souliane 2014-03-17 13:24:55 +01:00
commit 67d15eb488
2 changed files with 80 additions and 41 deletions

View file

@ -267,10 +267,20 @@ class Chat(wx.Frame, QuickChat):
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

View file

@ -523,12 +523,3 @@ class MainWindow(wx.Frame, QuickApp):
self.Show()
self.Raise()
e.Skip()
def chatStateReceived(self, from_jid_s, state, profile):
"""Signal observer to display a contact chat state
@param from_jid_s: contact who sent his new state
@state: state
@profile: current profile
"""
print "TODO: chatStateReceived not implemented yet"
pass