# HG changeset patch # User Goffi # Date 1309867563 -7200 # Node ID aff34642616bc169b162f98b13ea5023bdb58e1b # Parent f8af6b21ed6149b845a1c69bc165bfc965122313 browser side: widgets are now added in a widgetsPanel when a tab is created diff -r f8af6b21ed61 -r aff34642616b libervia.py --- a/libervia.py Tue Jul 05 14:05:30 2011 +0200 +++ b/libervia.py Tue Jul 05 14:06:03 2011 +0200 @@ -28,6 +28,7 @@ from pyjamas.JSONService import JSONProxy from browser_side.register import RegisterBox from browser_side.contact import ContactPanel +from browser_side.panels import WidgetsPanel from browser_side import panels, dialog from browser_side.jid import JID from browser_side.tools import html_sanitize @@ -164,11 +165,13 @@ if widget: self.selected.addStyleName('selected_widget') - def addTab(self, panel, label): - """Add a panel in a tab - @param panel: panel to add + def addTab(self, wid, label): + """Create a new tab and add a widget in + @param wid: LiberviaWidget to add @param label: label of the tab""" - self.tab_panel.add(panel, label) + _widgets_panel = WidgetsPanel(self) + _widgets_panel.addWidget(wid) + self.tab_panel.add(_widgets_panel, label) def _isRegisteredCB(self, registered): if not registered: