comparison src/browser/sat_browser/blog.py @ 616:1c0d5a87c554 frontends_multi_profiles

browser_side: add and use method displayWidget to harmonize widget's management in Libervia (not completely done, there are some issues)
author souliane <souliane@mailoo.org>
date Wed, 11 Feb 2015 11:18:13 +0100
parents 537649f6a2d0
children 5baca9d46c34
comparison
equal deleted inserted replaced
615:70872a83ef15 616:1c0d5a87c554
443 @return: the created MicroblogPanel 443 @return: the created MicroblogPanel
444 """ 444 """
445 items_ = tuple(item) if isinstance(item, list) else (() if item is None else (item,)) 445 items_ = tuple(item) if isinstance(item, list) else (() if item is None else (item,))
446 type_ = 'ALL' if items_ == () else 'GROUP' 446 type_ = 'ALL' if items_ == () else 'GROUP'
447 # XXX: pyjamas doesn't support use of cls directly 447 # XXX: pyjamas doesn't support use of cls directly
448 widget = host.widgets.getOrCreateWidget(MicroblogPanel, items_, profile=C.PROF_KEY_NONE, on_new_widget=None, on_existing_widget=C.WIDGET_RECREATE) 448 widget = host.displayWidget(MicroblogPanel, items_, dropped=True)
449 host.FillMicroblogPanel(widget) 449 host.FillMicroblogPanel(widget)
450 host.bridge.getMassiveLastMblogs(type_, items_, 10, profile=C.PROF_KEY_NONE, callback=widget.massiveInsert) 450 host.bridge.getMassiveLastMblogs(type_, items_, 10, profile=C.PROF_KEY_NONE, callback=widget.massiveInsert)
451 widget.refresh() # FIXME: needed ? 451 widget.refresh() # FIXME: needed ?
452 return widget 452 return widget
453 453