comparison cagou/core/xmlui.py @ 235:525527a01439

xmlui: use create with partial and class_map, following change in base class
author Goffi <goffi@goffi.org>
date Fri, 31 Aug 2018 16:58:10 +0200
parents add3dcd65dd6
children ca86954b3788
comparison
equal deleted inserted replaced
234:61ba5d193cfe 235:525527a01439
33 from kivy.uix.dropdown import DropDown 33 from kivy.uix.dropdown import DropDown
34 from kivy.uix.switch import Switch 34 from kivy.uix.switch import Switch
35 from kivy import properties 35 from kivy import properties
36 from cagou import G 36 from cagou import G
37 from cagou.core import dialog 37 from cagou.core import dialog
38 from functools import partial
38 39
39 40
40 ## Widgets ## 41 ## Widgets ##
41 42
42 43
575 576
576 class XMLUIDialog(xmlui.XMLUIDialog): 577 class XMLUIDialog(xmlui.XMLUIDialog):
577 dialog_factory = WidgetFactory() 578 dialog_factory = WidgetFactory()
578 579
579 580
580 xmlui.registerClass(xmlui.CLASS_PANEL, XMLUIPanel) 581 create = partial(xmlui.create, class_map={
581 xmlui.registerClass(xmlui.CLASS_DIALOG, XMLUIDialog) 582 xmlui.CLASS_PANEL: XMLUIPanel,
582 create = xmlui.create 583 xmlui.CLASS_DIALOG: XMLUIDialog})