Diff
Differences From Artifact [0227a222a4]:
- File channels/configwin.py — part of check-in [095de3353f] at 2016-10-27 16:42:04 on branch trunk — Introduce `dict` configuration type, prepare TreeView in uikit (similar to record/play config table). (user: mario, size: 8042) [annotate] [blame] [check-ins using]
To Artifact [834ef930af]:
- File
channels/configwin.py
— part of check-in
[d90db23c73]
at
2016-10-28 18:11:30
on branch trunk
— Move liststore_edit() and app_bin_check() from configwin. to uikit.
Allow ListStore for config_play/_record/_specbuttons without `editable` row [2], which is now a property of the CellRenderers (instead of a cell-attribute).
Specialized uikit.config_treeview() builds a custom two-column TreeView now. (user: mario, size: 7318) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - | # api: streamtuner2 # title: Config dialog # description: Allows to configure players, options, and plugins # version: 2.5 # type: feature # category: ui # config: - |
66 67 68 69 70 71 72 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - - + + | # number elif isinstance(w, gtk.SpinButton): w.set_value(int(val)) # list elif isinstance(w, gtk.ListStore) and isinstance(val, dict): w.clear() for k,v in val.items(): |
95 96 97 98 99 100 101 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - - - - - - - - - - - - - - - - - - - - - | elif isinstance(w, gtk.ListStore): config[key] = {} for row in w: if row[0] and row[1]: config[key][row[0]] = row[1] log.CONF("config save", prefix+key, val) |
175 176 177 178 179 180 181 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - + + | else: cb = gtk.SpinButton() cb.set_adjustment(adj) cb.set_digits(0) # ListView elif opt["type"] in ("list", "table", "array", "dict"): |