Mercurial > libervia-web
comparison browser_side/menu.py @ 125:f9d63624699f
radio collective integration, first draft
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 05 Jan 2012 00:22:03 +0100 |
parents | 500a1529c191 |
children | ddfcc4cb6cee |
comparison
equal
deleted
inserted
replaced
124:6d1f4a3da29b | 125:f9d63624699f |
---|---|
80 menu_contacts.addItem("update contact", MenuCmd(self, "onUpdateContact")) | 80 menu_contacts.addItem("update contact", MenuCmd(self, "onUpdateContact")) |
81 menu_contacts.addItem("remove contact", MenuCmd(self, "onRemoveContact")) | 81 menu_contacts.addItem("remove contact", MenuCmd(self, "onRemoveContact")) |
82 | 82 |
83 menu_group = MenuBar(vertical=True) | 83 menu_group = MenuBar(vertical=True) |
84 menu_group.addItem("join room", MenuCmd(self, "onJoinRoom")) | 84 menu_group.addItem("join room", MenuCmd(self, "onJoinRoom")) |
85 menu_group.addItem("Collective radio", MenuCmd(self, "onCollectiveRadio")) | |
85 | 86 |
86 menu_games = MenuBar(vertical=True) | 87 menu_games = MenuBar(vertical=True) |
87 menu_games.addItem("Tarot", MenuCmd(self, "onTarotGame")) | 88 menu_games.addItem("Tarot", MenuCmd(self, "onTarotGame")) |
88 menu_games.addItem("Xiangqi", MenuCmd(self, "onXiangqiGame")) | 89 menu_games.addItem("Xiangqi", MenuCmd(self, "onXiangqiGame")) |
89 | 90 |
227 _main_panel.add(button_panel) | 228 _main_panel.add(button_panel) |
228 _dialog = DialogBox(centered=True) | 229 _dialog = DialogBox(centered=True) |
229 _dialog.setHTML('Group discussions') | 230 _dialog.setHTML('Group discussions') |
230 _dialog.setWidget(_main_panel) | 231 _dialog.setWidget(_main_panel) |
231 _dialog.show() | 232 _dialog.show() |
232 | 233 |
234 def onCollectiveRadio(self): | |
235 def onContactsSelected(contacts): | |
236 print("let's go :)") | |
237 self.host.bridge.call('launchRadioCollective', None, contacts) | |
238 dialog.ContactsChooser(self.host, onContactsSelected, None, text="Please select contacts to invite").getContacts() | |
233 | 239 |
234 #Game menu | 240 #Game menu |
235 | 241 |
236 def onTarotGame(self): | 242 def onTarotGame(self): |
237 #Window.alert("Tarot selected") | 243 #Window.alert("Tarot selected") |