cleanup old code
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
104d1c9f87
commit
ae984fd85a
|
@ -19,39 +19,23 @@ type BasicEntry struct {
|
||||||
l *gui.Node // label widget
|
l *gui.Node // label widget
|
||||||
v *gui.Node // value widget
|
v *gui.Node // value widget
|
||||||
|
|
||||||
value string
|
|
||||||
label string
|
|
||||||
|
|
||||||
Custom func()
|
Custom func()
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
func (n *BasicEntry) SetText(s string) *BasicEntry {
|
||||||
func (n *BasicEntry) Get() string {
|
log.Log(INFO, "BasicEntry.Set() =", s)
|
||||||
return n.value
|
n.v.SetText(s)
|
||||||
}
|
|
||||||
|
|
||||||
func (n *BasicEntry) Set(value string) *BasicEntry {
|
|
||||||
log.Log(INFO, "BasicEntry.Set() =", value)
|
|
||||||
if (n.v != nil) {
|
|
||||||
n.v.Set(value)
|
|
||||||
}
|
|
||||||
n.value = value
|
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
func (n *BasicEntry) Enable() {
|
func (n *BasicEntry) Enable() {
|
||||||
log.Log(INFO, "BasicEntry.Enable()")
|
log.Log(INFO, "BasicEntry.Enable()")
|
||||||
if n.v != nil {
|
n.v.Enable()
|
||||||
n.v.Enable()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *BasicEntry) Disable() {
|
func (n *BasicEntry) Disable() {
|
||||||
log.Log(INFO, "BasicEntry.Disable()")
|
log.Log(INFO, "BasicEntry.Disable()")
|
||||||
if n.v != nil {
|
n.v.Disable()
|
||||||
n.v.Disable()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *BasicEntry) String() string {
|
func (n *BasicEntry) String() string {
|
||||||
|
@ -67,15 +51,13 @@ func (n *BasicEntry) SetLabel(s string) *BasicEntry {
|
||||||
func NewBasicEntry(p *gui.Node, name string) *BasicEntry {
|
func NewBasicEntry(p *gui.Node, name string) *BasicEntry {
|
||||||
d := BasicEntry{
|
d := BasicEntry{
|
||||||
parent: p,
|
parent: p,
|
||||||
value: "",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// various timeout settings
|
// various timeout settings
|
||||||
d.l = p.NewLabel(name)
|
d.l = p.NewLabel(name)
|
||||||
d.v = p.NewEntryLine("")
|
d.v = p.NewEntryLine("")
|
||||||
d.v.Custom = func() {
|
d.v.Custom = func() {
|
||||||
d.value = d.v.String()
|
log.Log(INFO, "BasicEntry() user changed =", d.String())
|
||||||
log.Log(INFO, "BasicEntry.Custom() user changed value to =", d.value)
|
|
||||||
if d.Custom != nil {
|
if d.Custom != nil {
|
||||||
d.Custom()
|
d.Custom()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue