tools, frontends, memory: param definition and XMLUI handle multi-selection for list widgets:
- we need to update urwid_satext to revision 79
- no more "value" attribute value in the "list" element, use
HTML-style "select" attribute in the "option" elements instead
- /!\ param saving do not handle multiple values yet!
This commit is contained in:
parent
8fa0b7b8c2
commit
608e2ba9fa
8 changed files with 82 additions and 39 deletions
|
|
@ -77,8 +77,7 @@ class TextSyntaxes(object):
|
|||
<params>
|
||||
<individual>
|
||||
<category name="%(category_name)s" label="%(category_label)s">
|
||||
<param name="%(name)s" label="%(label)s"
|
||||
value="%(default)s" type="list" security="0">
|
||||
<param name="%(name)s" label="%(label)s" type="list" security="0">
|
||||
%(options)s
|
||||
</param>
|
||||
</category>
|
||||
|
|
@ -91,7 +90,6 @@ class TextSyntaxes(object):
|
|||
'category_label': _(CATEGORY),
|
||||
'name': NAME,
|
||||
'label': _(NAME),
|
||||
'default': _SYNTAX_XHTML,
|
||||
'syntaxes': {},
|
||||
}
|
||||
|
||||
|
|
@ -128,7 +126,8 @@ class TextSyntaxes(object):
|
|||
options = []
|
||||
|
||||
for syntax in syntaxes:
|
||||
options.append(u'<option value="%s" />' % syntax)
|
||||
selected = 'selected="true"' if syntax == _SYNTAX_XHTML else ''
|
||||
options.append(u'<option value="%s" %s/>' % (syntax, selected))
|
||||
|
||||
TextSyntaxes.params_data["options"] = u'\n'.join(options)
|
||||
self.host.memory.updateParams(TextSyntaxes.params % TextSyntaxes.params_data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue