Overview
Comment: | precautionarily rewrap PluginMeta (for e.g. manually constructed plugins={} list) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
8082a94a20487f07652bbb65de935852 |
User & Date: | mario on 2023-10-26 21:45:45 |
Other Links: | manifest | tags |
Context
2023-10-26
| ||
22:56 | typo Leaf check-in: b9be77c869 user: mario tags: trunk | |
21:45 | precautionarily rewrap PluginMeta (for e.g. manually constructed plugins={} list) check-in: 8082a94a20 user: mario tags: trunk | |
2022-11-12
| ||
22:58 | decoding fixes for pyinstaller/win setups, default on PluginMeta() for unreadable modules check-in: c996a868e2 user: mario tags: trunk | |
Changes
Modified pluginconf/gui.py from [3c6e3b23f8] to [ab40f3573a].
︙ | ︙ | |||
124 125 126 127 128 129 130 131 132 133 134 135 136 137 | return [sg.Image(data=img_fn, **size)] if img_fn.find(".") > 0: return [sg.Image(filename=re.sub("[^/]+$", img_fn, pmd.fn), **size)] return [] def plugin_entry(pmd, plugin_states): """ checkbox for plugin name """ return [ [ sg.Checkbox( pmd.get("title", pmd.id), key='p:'+pmd.id, default=plugin_states.get(pmd.id, 0), tooltip=pmd.get("doc"), metadata="plugin", font="bold", pad=(0, (8, 0)) ), *plugin_icon(pmd), | > > | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | return [sg.Image(data=img_fn, **size)] if img_fn.find(".") > 0: return [sg.Image(filename=re.sub("[^/]+$", img_fn, pmd.fn), **size)] return [] def plugin_entry(pmd, plugin_states): """ checkbox for plugin name """ if not instanceof(pmd, pluginconf.PluginMeta): pmd = pluginconf.PluginMeta(pmd) return [ [ sg.Checkbox( pmd.get("title", pmd.id), key='p:'+pmd.id, default=plugin_states.get(pmd.id, 0), tooltip=pmd.get("doc"), metadata="plugin", font="bold", pad=(0, (8, 0)) ), *plugin_icon(pmd), |
︙ | ︙ | |||
148 149 150 151 152 153 154 155 156 157 158 159 160 161 | #print(o) name = opt.get("name", "") desc = wrap(opt.get("description", name), 60) typedef = opt.get("type", "str") tooltip = wrap(opt.get("help", name), 60) OPTIONS[name] = opt val = config.get(name, opt.get("value", "")) widget = [] if opt.get("hidden"): pass elif typedef == "str": widget = [ sg.InputText(key=name, default_text=str(val), size=(20, 1), pad=((50, 0), 3)), | > | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | #print(o) name = opt.get("name", "") desc = wrap(opt.get("description", name), 60) typedef = opt.get("type", "str") tooltip = wrap(opt.get("help", name), 60) OPTIONS[name] = opt val = config.get(name, opt.get("value", "")) #log.debug("add gui field '%s', typedef=%s, val=%s", name, typedef, val) widget = [] if opt.get("hidden"): pass elif typedef == "str": widget = [ sg.InputText(key=name, default_text=str(val), size=(20, 1), pad=((50, 0), 3)), |
︙ | ︙ |