diff libervia.py @ 285:4f0c2fea358a

browser_side (plugin radiocol): use the status label to give more information
author souliane <souliane@mailoo.org>
date Tue, 26 Nov 2013 19:51:02 +0100
parents ae3ec654836d
children 92d76ab67156
line wrap: on
line diff
--- a/libervia.py	Mon Nov 25 21:04:09 2013 +0100
+++ b/libervia.py	Tue Nov 26 19:51:02 2013 +0100
@@ -369,9 +369,9 @@
         elif name == 'newAlert':
             self._newAlert(*args)
         elif name == 'tarotGamePlayers':
-            self._tarotGameStartedCb(*args, waiting=True)
+            self._tarotGameStartedCb(True, *args)
         elif name == 'tarotGameStarted':
-            self._tarotGameStartedCb(*args)
+            self._tarotGameStartedCb(False, *args)
         elif name == 'tarotGameNew' or \
              name == 'tarotGameChooseContrat' or \
              name == 'tarotGameShowCards' or \
@@ -381,9 +381,9 @@
              name == 'tarotGameScore':
             self._tarotGameGenericCb(name, args[0], args[1:])
         elif name == 'radiocolPlayers':
-            self._radioColStartedCb(*args, waiting=True)
+            self._radioColStartedCb(True, *args)
         elif name == 'radiocolStarted':
-            self._radioColStartedCb(*args)
+            self._radioColStartedCb(False, *args)
         elif name == 'radiocolPreload':
             self._radioColGenericCb(name, args[0], args[1:])
         elif name == 'radiocolPlay':
@@ -639,20 +639,20 @@
             if isinstance(lib_wid, panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
                 lib_wid.userLeft(user_nick, user_data)
 
-    def _tarotGameStartedCb(self, room_jid_s, referee, players, waiting=False):
+    def _tarotGameStartedCb(self, waiting, room_jid_s, referee, players):
         for lib_wid in self.libervia_widgets:
             if isinstance(lib_wid, panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
-                lib_wid.startGame("Tarot", referee, players, waiting)
+                lib_wid.startGame("Tarot", waiting, referee, players)
 
     def _tarotGameGenericCb(self, event_name, room_jid_s, args):
         for lib_wid in self.libervia_widgets:
             if isinstance(lib_wid, panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
                 getattr(lib_wid.getGame("Tarot"), event_name)(*args)
 
-    def _radioColStartedCb(self, room_jid_s, referee, players, waiting=False):
+    def _radioColStartedCb(self, waiting, room_jid_s, referee, players, queue_data):
         for lib_wid in self.libervia_widgets:
             if isinstance(lib_wid, panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid_s:
-                lib_wid.startGame("RadioCol", referee, players, waiting)
+                lib_wid.startGame("RadioCol", waiting, referee, players, queue_data)
 
     def _radioColGenericCb(self, event_name, room_jid_s, args):
         for lib_wid in self.libervia_widgets: