diff options
| author | Jeff Carr <[email protected]> | 2023-04-22 12:25:50 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-22 12:25:50 -0500 |
| commit | 52eb9b1ad29756756881b90ba5221d03cd504fbd (patch) | |
| tree | 8e80b65d20516d57797b7e3d39d44a147c7641ba /toolkit/gocui/plugin.go | |
| parent | 2b10d882a35d5a8b79c7d48eaa59e7d027be5e8d (diff) | |
unloading the gocui toolkit works
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/plugin.go')
| -rw-r--r-- | toolkit/gocui/plugin.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/toolkit/gocui/plugin.go b/toolkit/gocui/plugin.go index ce47f20..f70ae96 100644 --- a/toolkit/gocui/plugin.go +++ b/toolkit/gocui/plugin.go @@ -1,6 +1,7 @@ package main import ( + "os" // if you include more than just this import // then your plugin might be doing something un-ideal (just a guess from 2023/02/27) "git.wit.org/wit/gui/toolkit" @@ -38,6 +39,11 @@ func action(a *toolkit.Action) { w.AddText(a.S) case toolkit.Move: log(logNow, "attempt to move() =", a.ActionType, a.WidgetType, a.Name) + case toolkit.CloseToolkit: + log(logNow, "attempting to close the plugin and release stdout and stderr") + me.baseGui.Close() + // defer outf.Close() + setOutput(os.Stdout) default: log(logError, "action() Unknown =", a.ActionType, a.WidgetType, a.Name) } |
