From a8d95fef8d0879a3e3ecdac76ab4df4fee658fcf Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 18 Jan 2024 05:04:18 -0600 Subject: lots of syntax changes Signed-off-by: Jeff Carr --- basicEntry.go | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'basicEntry.go') diff --git a/basicEntry.go b/basicEntry.go index 29a0dd8..d20fe18 100644 --- a/basicEntry.go +++ b/basicEntry.go @@ -1,26 +1,26 @@ /* - A Labeled Single Line Entry widget: +A Labeled Single Line Entry widget: - ----------------------------- - | | | - | Food: | | - | | | - ----------------------------- +----------------------------- +| | | +| Food: | | +| | | +----------------------------- */ package gadgets -import ( +import ( + "go.wit.com/gui" "go.wit.com/log" - "go.wit.com/gui/gui" ) type BasicEntry struct { - parent *gui.Node // parent widget - l *gui.Node // label widget - v *gui.Node // value widget + parent *gui.Node // parent widget + l *gui.Node // label widget + v *gui.Node // value widget - value string - label string + value string + label string Custom func() } @@ -42,14 +42,14 @@ func (n *BasicEntry) Set(value string) *BasicEntry { func (n *BasicEntry) Enable() { log.Log(INFO, "BasicEntry.Enable()") - if (n.v != nil) { + if n.v != nil { n.v.Enable() } } func (n *BasicEntry) Disable() { log.Log(INFO, "BasicEntry.Disable()") - if (n.v != nil) { + if n.v != nil { n.v.Disable() } } @@ -65,9 +65,9 @@ func (n *BasicEntry) SetLabel(s string) *BasicEntry { } func NewBasicEntry(p *gui.Node, name string) *BasicEntry { - d := BasicEntry { + d := BasicEntry{ parent: p, - value: "", + value: "", } // various timeout settings -- cgit v1.2.3