comparison src/browser/libervia_main.py @ 458:1eeed8028199

browser side: rename parameter of getParent / getWidgetPanel from 'verbose' to 'expect'
author souliane <souliane@mailoo.org>
date Thu, 29 May 2014 17:49:59 +0200
parents b55bc50756fa
children d0cd8ae579f7
comparison
equal deleted inserted replaced
457:b55bc50756fa 458:1eeed8028199
620 @param ignoreOtherTabs: if True, the widgets that are not 620 @param ignoreOtherTabs: if True, the widgets that are not
621 contained by the currently selected tab will be ignored 621 contained by the currently selected tab will be ignored
622 @return: the existing widget that has been found or None.""" 622 @return: the existing widget that has been found or None."""
623 selected_tab = self.tab_panel.getCurrentPanel() 623 selected_tab = self.tab_panel.getCurrentPanel()
624 for lib_wid in self.libervia_widgets: 624 for lib_wid in self.libervia_widgets:
625 parent = lib_wid.getWidgetsPanel(verbose=False) 625 parent = lib_wid.getWidgetsPanel(expect=False)
626 if parent is None or (ignoreOtherTabs and parent != selected_tab): 626 if parent is None or (ignoreOtherTabs and parent != selected_tab):
627 # do not return a widget that is not in the currently selected tab 627 # do not return a widget that is not in the currently selected tab
628 continue 628 continue
629 if isinstance(lib_wid, class_): 629 if isinstance(lib_wid, class_):
630 try: 630 try:
656 if new_tab is None: 656 if new_tab is None:
657 self.addWidget(lib_wid) 657 self.addWidget(lib_wid)
658 else: 658 else:
659 tab = self.addTab(new_tab, lib_wid, False) 659 tab = self.addTab(new_tab, lib_wid, False)
660 else: # reuse existing widget 660 else: # reuse existing widget
661 tab = lib_wid.getWidgetsPanel(verbose=False) 661 tab = lib_wid.getWidgetsPanel(expect=False)
662 if new_tab is None: 662 if new_tab is None:
663 if tab is not None: 663 if tab is not None:
664 tab.removeWidget(lib_wid) 664 tab.removeWidget(lib_wid)
665 self.addWidget(lib_wid) 665 self.addWidget(lib_wid)
666 if select: 666 if select: