From a22d940e8144831b2df4f9a12f031e5d2cb0e809 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 26 Jan 2024 11:11:47 -0600 Subject: [PATCH] new gui move to SetText() use SetChecked() Signed-off-by: Jeff Carr --- go.mod | 4 ++-- go.sum | 8 ++++---- logFlag.go | 2 +- oneLiner.go | 5 +++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index e53bc2f..ed82855 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module go.wit.com/lib/gadgets go 1.21.4 require ( - go.wit.com/gui v0.13.11 + go.wit.com/gui v0.13.13 go.wit.com/log v0.5.6 ) @@ -11,5 +11,5 @@ require ( go.wit.com/dev/alexflint/arg v1.4.5 // indirect go.wit.com/dev/alexflint/scalar v1.2.1 // indirect go.wit.com/dev/davecgh/spew v1.1.4 // indirect - go.wit.com/widget v1.1.6 // indirect + go.wit.com/widget v1.1.7 // indirect ) diff --git a/go.sum b/go.sum index 153e6e4..4b7fc44 100644 --- a/go.sum +++ b/go.sum @@ -4,9 +4,9 @@ go.wit.com/dev/alexflint/scalar v1.2.1 h1:loXOcbVnd+8YeJRLey+XXidecBiedMDO00zQ26 go.wit.com/dev/alexflint/scalar v1.2.1/go.mod h1:+rYsfxqdI2cwA8kJ7GCMwWbNJvfvWUurOCXLiwdTtSs= go.wit.com/dev/davecgh/spew v1.1.4 h1:C9hj/rjlUpdK+E6aroyLjCbS5MFcyNUOuP1ICLWdNek= go.wit.com/dev/davecgh/spew v1.1.4/go.mod h1:sihvWmnQ/09FWplnEmozt90CCVqBtGuPXM811tgfhFA= -go.wit.com/gui v0.13.11 h1:d74Ko/XFZYR25P/AZfCQaVO2CuGh1BSjdUp1wjktdDg= -go.wit.com/gui v0.13.11/go.mod h1:v2VgnOL3dlZ13KclYeedZ1cd20nQdvwjyJTNKvFX3DA= +go.wit.com/gui v0.13.13 h1:rIaEIYol92gHbP/JkJCmFdzo7u5Bc3WoqBA3hwttL6o= +go.wit.com/gui v0.13.13/go.mod h1:xdCB1u4UqyaijwZnDdO9510nBlbf4Cdgfsd+R7VtUDo= go.wit.com/log v0.5.6 h1:rDC3ju95zfEads4f1Zm+QMkqjZ39CsYAT/UmQQs7VP4= go.wit.com/log v0.5.6/go.mod h1:BaJBfHFqcJSJLXGQ9RHi3XVhPgsStxSMZRlaRxW4kAo= -go.wit.com/widget v1.1.6 h1:av2miF5vlohMfARA/QGPTPfgW/ADup1c+oeAOKgroPY= -go.wit.com/widget v1.1.6/go.mod h1:I8tnD3x3ECbB/CRNnLCdC+uoyk7rK0AEkzK1bQYSqoQ= +go.wit.com/widget v1.1.7 h1:Gy84I2bD8CMna7NcKBX4sRLR8do6x6mVYX0Ui43f3is= +go.wit.com/widget v1.1.7/go.mod h1:I8tnD3x3ECbB/CRNnLCdC+uoyk7rK0AEkzK1bQYSqoQ= diff --git a/logFlag.go b/logFlag.go index 6dea0de..67df269 100644 --- a/logFlag.go +++ b/logFlag.go @@ -114,7 +114,7 @@ func NewLogFlag(n *gui.Node, lf *log.LogFlag) *LogFlag { f.lf.SetBool(f.checkbox.Bool()) } - f.checkbox.SetValue(lf.Bool()) + f.checkbox.SetChecked(lf.Bool()) return &f } diff --git a/oneLiner.go b/oneLiner.go index ba03cbf..1e7c687 100644 --- a/oneLiner.go +++ b/oneLiner.go @@ -26,6 +26,11 @@ func (n *OneLiner) String() string { return n.v.String() } +func (n *OneLiner) SetText(s string) *OneLiner { + n.SetValue(s) + return n +} + func (n *OneLiner) SetValue(s string) *OneLiner { log.Log(GADGETS, "OneLiner.Set() =", s) n.v.SetLabel(s)