diff options
| author | Jeff Carr <[email protected]> | 2023-04-07 09:18:03 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-07 09:18:03 -0500 |
| commit | 820067cbff754cf9a5f96c425d8f31b5949d353c (patch) | |
| tree | 70d0e9d9be1ca988078a0bffedc66b824d928cc3 /toolkit/gocui/plugin.go | |
| parent | ba35c2760687384055d2b7ae733e0f9ac814af4c (diff) | |
open gocui when DISPLAY=""
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/plugin.go')
| -rw-r--r-- | toolkit/gocui/plugin.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/toolkit/gocui/plugin.go b/toolkit/gocui/plugin.go index eb3f2af..1758690 100644 --- a/toolkit/gocui/plugin.go +++ b/toolkit/gocui/plugin.go @@ -15,8 +15,15 @@ func Action(a *toolkit.Action) { w := findWidget(a.WidgetId, me.rootNode) switch a.ActionType { case toolkit.Add: - w = makeWidget(a) - w.addWidget() + if (w == nil) { + w = makeWidget(a) + w.addWidget() + } else { + // this is done to protect the plugin being 'refreshed' with the + // widget binary tree. TODO: find a way to keep them in sync + log(logError, "Action() Add ignored for already defined widget", + a.WidgetId, a.ActionType, a.WidgetType, a.Name) + } case toolkit.Show: if (a.B) { w.drawView() |
