cleanup old code
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
104d1c9f87
commit
ae984fd85a
|
@ -19,40 +19,24 @@ 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()
|
||||
}
|
||||
}
|
||||
|
||||
func (n *BasicEntry) Disable() {
|
||||
log.Log(INFO, "BasicEntry.Disable()")
|
||||
if n.v != nil {
|
||||
n.v.Disable()
|
||||
}
|
||||
}
|
||||
|
||||
func (n *BasicEntry) String() string {
|
||||
log.Log(INFO, "BasicEntry.SetLabel() =", n.v.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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue