Overview
| Comment: | use dict.pop() instead of get+del | 
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive | 
| Timelines: | family | ancestors | descendants | both | trunk | 
| Files: | files | file ages | folders | 
| SHA3-256: | 
900b323b25a7395a9c31edd329a900f3 | 
| User & Date: | mario on 2022-11-01 23:29:16 | 
| Other Links: | manifest | tags | 
Context
| 
   2022-11-01 
 | ||
| 23:30 | predefine conf[plugins], note .base(__package__) as example check-in: 94218baefa user: mario tags: trunk | |
| 23:29 | use dict.pop() instead of get+del check-in: 900b323b25 user: mario tags: trunk | |
| 18:50 | move name_to_fn and get_readme into MetaUtils check-in: 63fdedee18 user: mario tags: trunk | |
Changes
Modified pluginconf/gui.py from [579f93bf8f] to [19523612ff].
| ︙ | ︙ | |||
59 60 61 62 63 64 65  | 
    | 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]            |
    """
 | | | | < <  | 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))
 | 
| ︙ | ︙ |