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:
souliane 2014-04-01 21:21:13 +02:00
commit 608e2ba9fa

View file

@ -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):