Diff
Differences From 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]
To Artifact [f3a2a25e57]:
- File channels/configwin.py — part of check-in [50c68197c7] at 2016-10-28 23:12:11 on branch trunk — Enable `list`/`array`/`table` config schemes in addition to `dict`. Currently unused, just added because it's little more code. No custom value="x,x,x|y,y,y" parser yet. Not for `dict` either, as it's only used by specbuttons with a predefined list. (user: mario, size: 7899) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
62 63 64 65 66 67 68 | # dropdown elif isinstance(w, ComboBoxText): w.set_default(val) # number elif isinstance(w, gtk.SpinButton): w.set_value(int(val)) # list | | > | | | > > > > > > | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | # dropdown elif isinstance(w, ComboBoxText): w.set_default(val) # number elif isinstance(w, gtk.SpinButton): w.set_value(int(val)) # list elif isinstance(w, gtk.ListStore): w.clear() if isinstance(val, dict): for k,v in val.items(): w.append([k, v, uikit.app_bin_check(v)]) w.append(["", "", gtk.STOCK_NEW]) elif isinstance(val, list): for row in val: log.DATA(row) w.append([str(e) for e in row]) if len(val): w.append(["" for e in val[0]]) #log.CONF("config load", prefix+key, val, type(w)) # Store gtk widget valus back into conf. dict def save_config(self, config, prefix="config_", save=0): for key,val in config.items(): w = self.main.get_widget(prefix + key) if w: |
︙ | ︙ | |||
88 89 90 91 92 93 94 | elif isinstance(w, gtk.CheckButton): config[key] = w.get_active() # int elif isinstance(w, gtk.SpinButton): config[key] = int(w.get_value(val)) # dict elif isinstance(w, gtk.ListStore): | > > > > > | | | | | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | elif isinstance(w, gtk.CheckButton): config[key] = w.get_active() # int elif isinstance(w, gtk.SpinButton): config[key] = int(w.get_value(val)) # dict elif isinstance(w, gtk.ListStore): if key in config and isinstance(config[key], list): config[key] = [] for row in w: config[key].append([str(e) for e in row]) else: 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) # iterate over channel and feature plugins def add_plugins(self): ls = all_plugin_meta() for name,meta in sorted(ls.items(), key=lambda e: e[1]["type"]+e[1]["title"].lower(), reverse=False): |
︙ | ︙ |