Mercurial > libervia-web
comparison browser_side/panels.py @ 167:9441893e8f37
browser side: fixed tarot game, radio collective double panel issue
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 09 Jan 2013 22:02:00 +0100 |
parents | 9763dec220ed |
children | d97b0cba8b04 |
comparison
equal
deleted
inserted
replaced
166:4d177e3f6285 | 167:9441893e8f37 |
---|---|
769 self.content_scroll.scrollToBottom() | 769 self.content_scroll.scrollToBottom() |
770 | 770 |
771 def startGame(self, game_type, referee, players): | 771 def startGame(self, game_type, referee, players): |
772 """Configure the chat window to start a game""" | 772 """Configure the chat window to start a game""" |
773 if game_type=="Tarot": | 773 if game_type=="Tarot": |
774 if hasattr(self, "tarot_panel"): | |
775 return | |
774 self.tarot_panel = CardPanel(self, referee, players, self.nick) | 776 self.tarot_panel = CardPanel(self, referee, players, self.nick) |
775 self.vpanel.insert(self.tarot_panel, 0) | 777 self.vpanel.insert(self.tarot_panel, 0) |
776 self.vpanel.setCellHeight(self.tarot_panel, self.tarot_panel.getHeight()) | 778 self.vpanel.setCellHeight(self.tarot_panel, self.tarot_panel.getHeight()) |
777 elif game_type=="RadioCol": | 779 elif game_type=="RadioCol": |
780 #XXX: We can have double panel if we join quickly enough to have the group chat start signal | |
781 # on invitation + the one triggered on room join | |
782 if hasattr(self, "radiocol_panel"): | |
783 return | |
778 self.radiocol_panel = RadioColPanel(self, referee, self.nick) | 784 self.radiocol_panel = RadioColPanel(self, referee, self.nick) |
779 self.vpanel.insert(self.radiocol_panel, 0) | 785 self.vpanel.insert(self.radiocol_panel, 0) |
780 self.vpanel.setCellHeight(self.radiocol_panel, self.radiocol_panel.getHeight()) | 786 self.vpanel.setCellHeight(self.radiocol_panel, self.radiocol_panel.getHeight()) |
781 | 787 |
782 def getGame(self, game_type): | 788 def getGame(self, game_type): |