diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-05-04 20:45:48 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-05-04 21:05:47 +0200 |
commit | 3858273084b78f178d18f1c1fa1a9835e4a2b866 (patch) | |
tree | 70e608bfde428076402fa76b4d0cc0f67749197b /src | |
parent | d78b7df68b452bd81af153e285224fc568962af4 (diff) | |
download | poezio-3858273084b78f178d18f1c1fa1a9835e4a2b866.tar.gz poezio-3858273084b78f178d18f1c1fa1a9835e4a2b866.tar.bz2 poezio-3858273084b78f178d18f1c1fa1a9835e4a2b866.tar.xz poezio-3858273084b78f178d18f1c1fa1a9835e4a2b866.zip |
Fix two tb in the DataFormTab
- when list-multi doesn't have selected values at all
- text-multi.options() provided by sleekxmpp is apparently a '\n' separated
string, and not a list
Diffstat (limited to 'src')
-rw-r--r-- | src/tabs/data_forms.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tabs/data_forms.py b/src/tabs/data_forms.py index 44c29e6c..70190243 100644 --- a/src/tabs/data_forms.py +++ b/src/tabs/data_forms.py @@ -197,6 +197,7 @@ class TextMultiWin(FieldInput, windows.Win): FieldInput.__init__(self, field) windows.Win.__init__(self) self.options = field.getValue() + self.options = self.options.split('\n') if self.options else [] self.val_pos = 0 self.edition_input = None if not isinstance(self.options, list): @@ -270,9 +271,9 @@ class ListMultiWin(FieldInput, windows.Win): def __init__(self, field): FieldInput.__init__(self, field) windows.Win.__init__(self) - values = field.getValue() + values = field.getValue() or [] self.options = [[option, True if option['value'] in values else False]\ - for option in field.getOptions()] + for option in field.get_options()] self.val_pos = 0 def do_command(self, key): |