Mercurial > libervia-web
diff libervia.py @ 128:2849ec993d89
basic radio collective
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 23 Jan 2012 00:15:19 +0100 |
parents | e19a8de8b3de |
children | 6576c5a90060 |
line wrap: on
line diff
--- a/libervia.py Sun Jan 22 19:38:05 2012 +0100 +++ b/libervia.py Mon Jan 23 00:15:19 2012 +0100 @@ -243,6 +243,8 @@ self._tarotGameGenericCb(name, args[0], args[1:]) elif name == 'radiocolStarted': self._radioColStartedCb(*args) + elif name == 'radiocolPreload': + self._radioColGenericCb(name, args[0], args[1:]) elif name == 'subscribe': self._subscribeCb(*args) elif name == 'contactDeleted': @@ -360,6 +362,12 @@ if isinstance(lib_wid,panels.ChatPanel) and lib_wid.type == 'group' and lib_wid.target.bare == room_jid: lib_wid.startGame("RadioCol", referee) + def _radioColGenericCb(self, event_name, room_jid, 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: + getattr(lib_wid.getGame("RadioCol"), event_name)(*args) + + def _getPresenceStatusCb(self, presence_data): for entity in presence_data: for resource in presence_data[entity]: