Mercurial > libervia-web
comparison src/browser/sat_browser/game_radiocol.py @ 684:e876f493dccc
browser_side: follow changes made on quick_frontend for chat states and MUC symbols + minor fixes following the refactorisation:
- some MUC handlers are no more needed, the presence handler is enough
- move the chat states logic to quick_frontend
- display MUC games symbols
- remove classes contact_list.ContactsPanel, contact_panel.Occupant and contact_panel.OccupantsList
- move buildPresenceStyle and setPresenceStyle to html_tools
- fixes games menu callback
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 18 Mar 2015 10:17:04 +0100 |
parents | 849ffb24d5bf |
children | 9877607c719a |
comparison
equal
deleted
inserted
replaced
683:801eb94aa869 | 684:e876f493dccc |
---|---|
40 from pyjamas.Timer import Timer | 40 from pyjamas.Timer import Timer |
41 | 41 |
42 import html_tools | 42 import html_tools |
43 import file_tools | 43 import file_tools |
44 import dialog | 44 import dialog |
45 | |
46 | |
47 unicode = str # XXX: pyjama doesn't manage unicode | |
45 | 48 |
46 | 49 |
47 class MetadataPanel(FlexTable): | 50 class MetadataPanel(FlexTable): |
48 | 51 |
49 def __init__(self): | 52 def __init__(self): |
329 def hostReady(host): | 332 def hostReady(host): |
330 def onCollectiveRadio(self): | 333 def onCollectiveRadio(self): |
331 def callback(room_jid, contacts): | 334 def callback(room_jid, contacts): |
332 contacts = [unicode(contact) for contact in contacts] | 335 contacts = [unicode(contact) for contact in contacts] |
333 room_jid_s = unicode(room_jid) if room_jid else '' | 336 room_jid_s = unicode(room_jid) if room_jid else '' |
334 host.bridge.RadioCollective(contacts, room_jid_s, profile=C.PROF_KEY_NONE) | 337 host.bridge.launchRadioCollective(contacts, room_jid_s, profile=C.PROF_KEY_NONE) |
335 dialog.RoomAndContactsChooser(host, callback, ok_button="Choose", title="Collective Radio", visible=(False, True)) | 338 dialog.RoomAndContactsChooser(host, callback, ok_button="Choose", title="Collective Radio", visible=(False, True)) |
336 | 339 |
337 | 340 |
338 def gotMenus(): | 341 def gotMenus(): |
339 host.menus.addMenu(C.MENU_GLOBAL, (D_(u"Groups"), D_(u"Collective radio")), callback=onCollectiveRadio) | 342 host.menus.addMenu(C.MENU_GLOBAL, (D_(u"Groups"), D_(u"Collective radio")), callback=onCollectiveRadio) |