diff options
| author | Jeff Carr <[email protected]> | 2025-03-10 04:36:55 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-10 04:36:55 -0500 |
| commit | 5fa215983b3ddd340971c62351019bcc8d1f8b8c (patch) | |
| tree | a2709b606dce7931463a0724106176d78362b60e | |
| parent | 10d4942e6c1815634ce54150d8882db122beebf2 (diff) | |
attempt clean plugin exits
| -rw-r--r-- | plugin.go | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -333,6 +333,22 @@ func (n *Node) ListToolkits() { } } +// cleanly close all toolkits +func (n *Node) Close() { + Exit() +} + +func Exit() { + log.Log(PLUG, "Closing all toolkits") + for _, plug := range allPlugins { + log.Log(PLUG, "Exit() found plugin", plug.name) + var a widget.Action + a.ActionType = widget.ToolkitClose + plug.pluginChan <- a + } + allPlugins = nil +} + func (n *Node) CloseToolkit(name string) bool { log.Log(PLUG, "CloseToolkit() for name =", name) for i, plug := range allPlugins { |
