summaryrefslogtreecommitdiff
path: root/action.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-13 21:04:25 -0600
committerJeff Carr <[email protected]>2025-02-13 21:04:25 -0600
commita264a7d121a40f7a1827e5925bd20bcbfeacf63b (patch)
tree8fa43135cba8f056f06b554b47b015dd350de5f0 /action.go
parent5530d2c6ad95a27424eff4efe49da116307223d2 (diff)
add Disable() and Enable()
Diffstat (limited to 'action.go')
-rw-r--r--action.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/action.go b/action.go
index 735a13a..aa3c4d2 100644
--- a/action.go
+++ b/action.go
@@ -103,6 +103,14 @@ func show(n *tree.Node, b bool) {
}
}
+func enableWidget(n *tree.Node) {
+ enable(n, true)
+}
+
+func disableWidget(n *tree.Node) {
+ enable(n, false)
+}
+
func enable(n *tree.Node, b bool) {
if !ready(n) {
return