frontends (xmlui): a dict of named widgets is kept, so they can be easily be retrieved
This commit is contained in:
parent
3ec8f283cb
commit
83aa722103
1 changed files with 5 additions and 1 deletions
|
|
@ -324,7 +324,8 @@ class XMLUIPanel(XMLUIBase):
|
|||
|
||||
def __init__(self, host, parsed_dom, title=None, flags=None, callback=None, profile=C.PROF_KEY_NONE):
|
||||
super(XMLUIPanel, self).__init__(host, parsed_dom, title=title, flags=flags, callback=callback, profile=profile)
|
||||
self.ctrl_list = {} # usefull to access ctrl
|
||||
self.ctrl_list = {} # input widget, used mainly for forms
|
||||
self.widgets = {} # allow to access any named widgets
|
||||
self._main_cont = None
|
||||
self.constructUI(parsed_dom)
|
||||
|
||||
|
|
@ -480,6 +481,9 @@ class XMLUIPanel(XMLUIBase):
|
|||
log.error(_("FIXME FIXME FIXME: widget type [%s] is not implemented") % type_)
|
||||
raise NotImplementedError(_("FIXME FIXME FIXME: type [%s] is not implemented") % type_)
|
||||
|
||||
if name:
|
||||
self.widgets[name] = ctrl
|
||||
|
||||
if self.type == 'param' and type_ not in ('text', 'button'):
|
||||
try:
|
||||
ctrl._xmluiOnChange(self.onParamChange)
|
||||
|
|
|
|||
Loading…
Reference in a new issue