comparison sat_frontends/tools/xmlui.py @ 2737:5c2ed8a5ae22

frontends (XMLUI): TabsContainer can now be the main container (Primitivus keep the old behaviour and always use VerticalContainer as main container)
author Goffi <goffi@goffi.org>
date Wed, 02 Jan 2019 18:32:16 +0100
parents bdb8276fd2da
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2736:df2bc2e704bc 2737:5c2ed8a5ae22
437 if wanted and not node.nodeName in wanted: 437 if wanted and not node.nodeName in wanted:
438 raise InvalidXMLUI("Unexpected node: [%s]" % node.nodeName) 438 raise InvalidXMLUI("Unexpected node: [%s]" % node.nodeName)
439 439
440 if node.nodeName == "container": 440 if node.nodeName == "container":
441 type_ = node.getAttribute("type") 441 type_ = node.getAttribute("type")
442 if _xmlui_parent is self and type_ != "vertical": 442 if _xmlui_parent is self and type_ not in ("vertical", "tabs"):
443 # main container is not a VerticalContainer and we want one, 443 # main container is not a VerticalContainer and we want one,
444 # so we create one to wrap it 444 # so we create one to wrap it
445 _xmlui_parent = self.widget_factory.createVerticalContainer(self) 445 _xmlui_parent = self.widget_factory.createVerticalContainer(self)
446 self.main_cont = _xmlui_parent 446 self.main_cont = _xmlui_parent
447 if type_ == "tabs": 447 if type_ == "tabs":