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
1 changed files with 82 additions and 39 deletions
|
|
@ -59,7 +59,7 @@ class XEP_0249(object):
|
|||
<params>
|
||||
<individual>
|
||||
<category name="%(category_name)s" label="%(category_label)s">
|
||||
<param name="%(param_name)s" label="%(param_label)s" value="%(param_default)s" type="list" security="0">
|
||||
<param name="%(param_name)s" label="%(param_label)s" type="list" security="0">
|
||||
%(param_options)s
|
||||
</param>
|
||||
</category>
|
||||
|
|
@ -70,8 +70,9 @@ class XEP_0249(object):
|
|||
'category_label': _("Misc"),
|
||||
'param_name': AUTOJOIN_NAME,
|
||||
'param_label': _("Auto-join MUC on invitation"),
|
||||
'param_default': AUTOJOIN_VALUES[0],
|
||||
'param_options': ['<option value="%s"/>' % value for value in AUTOJOIN_VALUES]
|
||||
'param_options': '\n'.join(['<option value="%s" %s/>' % \
|
||||
(value, 'selected="true"' if value == AUTOJOIN_VALUES[0] else '') \
|
||||
for value in AUTOJOIN_VALUES])
|
||||
}
|
||||
|
||||
def __init__(self, host):
|
||||
|
|
|
|||
Loading…
Reference in a new issue