Mercurial > libervia-web
comparison src/browser/sat_browser/libervia_widget.py @ 650:7e3cdc39c3e7 frontends_multi_profiles
browser_side: fixes misc issues (forgotten parenthesis and wrong argument)
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 27 Feb 2015 00:56:08 +0100 |
parents | ccf95ec87005 |
children | 0262fee86375 |
comparison
equal
deleted
inserted
replaced
649:ccf95ec87005 | 650:7e3cdc39c3e7 |
---|---|
197 if not isinstance(_new_panel, LiberviaWidget): | 197 if not isinstance(_new_panel, LiberviaWidget): |
198 log.warning("droping an object which is not a class of LiberviaWidget") | 198 log.warning("droping an object which is not a class of LiberviaWidget") |
199 _flextable = self.getParent() | 199 _flextable = self.getParent() |
200 _widgetspanel = _flextable.getParent().getParent() | 200 _widgetspanel = _flextable.getParent().getParent() |
201 row_idx, cell_idx = self._getCellAndRow(_flextable, event) | 201 row_idx, cell_idx = self._getCellAndRow(_flextable, event) |
202 if self.host.getSelected == self: | 202 if self.host.getSelected() == self: |
203 self.host.setSelected(None) | 203 self.host.setSelected(None) |
204 _widgetspanel.changeWidget(row_idx, cell_idx, _new_panel) | 204 _widgetspanel.changeWidget(row_idx, cell_idx, _new_panel) |
205 """_unempty_panels = filter(lambda wid:not isinstance(wid,EmptyWidget),list(_flextable)) | 205 """_unempty_panels = filter(lambda wid:not isinstance(wid,EmptyWidget),list(_flextable)) |
206 _width = 90/float(len(_unempty_panels) or 1) | 206 _width = 90/float(len(_unempty_panels) or 1) |
207 #now we resize all the cell of the column | 207 #now we resize all the cell of the column |
815 @param locked (bool): If True, the tab will not be removed when there | 815 @param locked (bool): If True, the tab will not be removed when there |
816 are no more widget inside. If False, the tab will be removed with | 816 are no more widget inside. If False, the tab will be removed with |
817 the last widget. | 817 the last widget. |
818 @return: WidgetsPanel | 818 @return: WidgetsPanel |
819 """ | 819 """ |
820 widgets_panel = WidgetsPanel(self, locked=locked) | 820 widgets_panel = WidgetsPanel(self.host, locked=locked) |
821 self.addTab(widgets_panel, label, select) | 821 self.addTab(widgets_panel, label, select) |
822 return widgets_panel | 822 return widgets_panel |
823 | 823 |
824 def onWidgetPanelRemove(self, panel): | 824 def onWidgetPanelRemove(self, panel): |
825 """ Called when a child WidgetsPanel is empty and need to be removed """ | 825 """ Called when a child WidgetsPanel is empty and need to be removed """ |