59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
| files | list | Glob list of *.py files to extract meta definitions from|
| plugins | dict | Alternatively to files=[] list, a preparsed list of pluginmeta+config dicts can be injected |
| opt_label | bool | Show config name= as label (instead of description) |
| theme | str | Set PSG window theme. |
| **kwargs | dict | Other options are passed on to PySimpleGUI |
| **Returns** | True | if updated config{} values should be [Saved] |
"""
plugins = kwargs.get("plugins", {})
opt_label = kwargs.get("opt_label", False)
theme = kwargs.get("theme", "DefaultNoMoreNagging")
if theme:
if "theme" in kwargs:
del kwargs["theme"]
sg.theme(theme)
if files:
plugins = read_options(files)
layout = plugin_layout(plugins.values(), config, plugin_states, opt_label=opt_label)
layout.append([sg.T(" ")])
#print(repr(layout))
|
|
|
|
<
<
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
| files | list | Glob list of *.py files to extract meta definitions from|
| plugins | dict | Alternatively to files=[] list, a preparsed list of pluginmeta+config dicts can be injected |
| opt_label | bool | Show config name= as label (instead of description) |
| theme | str | Set PSG window theme. |
| **kwargs | dict | Other options are passed on to PySimpleGUI |
| **Returns** | True | if updated config{} values should be [Saved] |
"""
plugins = kwargs.pop("plugins", {})
opt_label = kwargs.pop("opt_label", False)
theme = kwargs.pop("theme", "")# "DefaultNoMoreNagging"
if theme:
sg.theme(theme)
if files:
plugins = read_options(files)
layout = plugin_layout(plugins.values(), config, plugin_states, opt_label=opt_label)
layout.append([sg.T(" ")])
#print(repr(layout))
|