cleanup old code

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-18 17:32:49 -06:00
parent 104d1c9f87
commit ae984fd85a
1 changed files with 6 additions and 24 deletions

View File

@ -19,39 +19,23 @@ type BasicEntry struct {
l *gui.Node // label widget
v *gui.Node // value widget
value string
label string
Custom func()
}
/*
func (n *BasicEntry) Get() string {
return n.value
}
func (n *BasicEntry) Set(value string) *BasicEntry {
log.Log(INFO, "BasicEntry.Set() =", value)
if (n.v != nil) {
n.v.Set(value)
}
n.value = value
func (n *BasicEntry) SetText(s string) *BasicEntry {
log.Log(INFO, "BasicEntry.Set() =", s)
n.v.SetText(s)
return n
}
*/
func (n *BasicEntry) Enable() {
log.Log(INFO, "BasicEntry.Enable()")
if n.v != nil {
n.v.Enable()
}
n.v.Enable()
}
func (n *BasicEntry) Disable() {
log.Log(INFO, "BasicEntry.Disable()")
if n.v != nil {
n.v.Disable()
}
n.v.Disable()
}
func (n *BasicEntry) String() string {
@ -67,15 +51,13 @@ func (n *BasicEntry) SetLabel(s string) *BasicEntry {
func NewBasicEntry(p *gui.Node, name string) *BasicEntry {
d := BasicEntry{
parent: p,
value: "",
}
// various timeout settings
d.l = p.NewLabel(name)
d.v = p.NewEntryLine("")
d.v.Custom = func() {
d.value = d.v.String()
log.Log(INFO, "BasicEntry.Custom() user changed value to =", d.value)
log.Log(INFO, "BasicEntry() user changed =", d.String())
if d.Custom != nil {
d.Custom()
}