summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-19 12:21:04 -0600
committerJeff Carr <[email protected]>2024-01-19 12:21:04 -0600
commita1b9ab39f723f73162b15f68e1207ef674ec7ce5 (patch)
tree5d4a00f2a412c944089b6eca3d09d3a6299bac4d
parent3b4fb5c4b6d710303c84e37e9f55a38cee3bbb45 (diff)
SetValue() and SetChecked()
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--durationSlider.go4
-rw-r--r--logFlag.go6
-rw-r--r--oneLiner.go4
3 files changed, 7 insertions, 7 deletions
diff --git a/durationSlider.go b/durationSlider.go
index 0824b63..8e79818 100644
--- a/durationSlider.go
+++ b/durationSlider.go
@@ -43,14 +43,14 @@ func (n *Duration) Set(d time.Duration) {
step = timeRange / 1000
if step == 0 {
log.Log(INFO, "duration.Set() division by step == 0", n.Low, n.High, timeRange, step)
- n.s.Set(0)
+ n.s.SetValue(0)
return
}
offset = d - n.Low
i := int(offset / step)
log.Log(INFO, "duration.Set() =", n.Low, n.High, d, "i =", i)
// n.s.I = i
- n.s.Set(i)
+ n.s.SetValue(i)
n.s.Custom()
}
diff --git a/logFlag.go b/logFlag.go
index 38cf77a..e8f2214 100644
--- a/logFlag.go
+++ b/logFlag.go
@@ -35,13 +35,13 @@ func (f *LogFlag) Get() bool {
func (f *LogFlag) Set(b bool) {
log.Info("LogFlag.Set() =", b)
f.lf.Set(b)
- f.c.Set(b)
+ f.c.SetChecked(b)
}
func (f *LogFlag) SetDefault() {
log.Info("LogFlag.SetDefault() =", f.Default)
f.lf.SetDefault()
- f.c.Set(f.lf.Get())
+ f.c.SetChecked(f.lf.Get())
}
func NewLogFlag(n *gui.Node, lf *log.LogFlag) *LogFlag {
@@ -58,7 +58,7 @@ func NewLogFlag(n *gui.Node, lf *log.LogFlag) *LogFlag {
f.lf.Set(f.c.Bool())
log.Info("LogFlag.Custom() user changed value to =", f.lf.Get())
}
- f.c.Set(lf.Get())
+ f.c.SetChecked(lf.Get())
return &f
}
diff --git a/oneLiner.go b/oneLiner.go
index 9b95d60..9dad512 100644
--- a/oneLiner.go
+++ b/oneLiner.go
@@ -28,14 +28,14 @@ func (n *OneLiner) String() string {
func (n *OneLiner) SetText(s string) *OneLiner {
log.Log(INFO, "OneLiner.Set() =", s)
- n.v.SetText(s)
+ n.v.SetLabel(s)
return n
}
func (n *OneLiner) SetLabel(value string) *OneLiner {
log.Log(INFO, "OneLiner.SetLabel() =", value)
if n.l != nil {
- n.l.Set(value)
+ n.l.SetLabel(value)
}
return n
}