Mercurial > libervia-backend
diff frontends/src/quick_frontend/quick_chat.py @ 1360:8ea8fa13c351 frontends_multi_profiles
frontends (quick_frontend, primitivus): fixes room games:
- add quick_frontend.quick_games for registering the signals and registering the UI classes
- rename the signals handlers to fit the convention (e.g.: tarotGameScoreHandler)
- rename card_game to game_tarot, quick_card_game to quick_game_tarot, CardGame to TarotGame
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 11 Mar 2015 12:43:48 +0100 |
parents | ebf72fe68d1c |
children | d3e9848b9574 |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_chat.py Wed Mar 11 12:36:22 2015 +0100 +++ b/frontends/src/quick_frontend/quick_chat.py Wed Mar 11 12:43:48 2015 +0100 @@ -48,6 +48,7 @@ self.id = "" # FIXME: to be removed self.nick = None self.occupants = set() + self.games = {} def __str__(self): return u"Chat Widget [target: {}, type: {}, profile: {}]".format(self.target, self.type, self.profile) @@ -227,16 +228,6 @@ """ raise NotImplementedError - def startGame(self, game_type, referee, players): - """Configure the chat window to start a game""" - #No need to raise an error as game are not mandatory - log.warning(_('startGame is not implemented in this frontend')) - - def getGame(self, game_type): - """Return class managing the game type""" - #No need to raise an error as game are not mandatory - log.warning(_('getGame is not implemented in this frontend')) - def updateChatState(self, from_jid, state): """Set the chat state (XEP-0085) of the contact. @@ -244,4 +235,19 @@ """ raise NotImplementedError + def addGamePanel(self, widget): + """Insert a game panel to this Chat dialog. + + @param widget (Widget): the game panel + """ + raise NotImplementedError + + def removeGamePanel(self, widget): + """Remove the game panel from this Chat dialog. + + @param widget (Widget): the game panel + """ + raise NotImplementedError + + quick_widgets.register(QuickChat)