From 36745e0492d52bf337f5e6db1ab52912511ec010 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 9 Feb 2025 06:14:57 -0600 Subject: button disable maybe works? --- plugin.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugin.go') diff --git a/plugin.go b/plugin.go index d758aca..2cec989 100644 --- a/plugin.go +++ b/plugin.go @@ -6,6 +6,7 @@ package main import ( // if you include more than just this import // then your plugin might be doing something un-ideal (just a guess from 2023/02/27) + "go.wit.com/log" "go.wit.com/toolkits/tree" "go.wit.com/widget" @@ -115,10 +116,14 @@ func newaction(n *tree.Node, atype widget.ActionType) { standardClose() case widget.Enable: w.enable = true - w.enableColor() + w.node.State.Enable = true + w.restoreEnableColor() + log.Info("enable widget in gocui", atype, n.WidgetType, n.ProgName()) case widget.Disable: w.enable = false + w.node.State.Enable = false w.setColorDisable() + log.Info("disable widget in gocui", atype, n.WidgetType, n.ProgName()) case widget.Delete: if w == nil { return -- cgit v1.2.3