diff options
Diffstat (limited to 'andlabs/setText.go')
| -rw-r--r-- | andlabs/setText.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/andlabs/setText.go b/andlabs/setText.go index c5453db..2e4b97b 100644 --- a/andlabs/setText.go +++ b/andlabs/setText.go @@ -1,9 +1,9 @@ package main import ( + "go.wit.com/lib/widget" "go.wit.com/log" - "go.wit.com/gui/widget" - "go.wit.com/gui/toolkits/tree" + "go.wit.com/toolkits/tree" ) // func (n *node) setText(a *widget.Action) { @@ -13,7 +13,7 @@ func setText(n *tree.Node, a *widget.Action) { tk = n.TK.(*guiWidget) log.Log(CHANGE, "setText() START with text =", name) - if (tk == nil) { + if tk == nil { log.Log(ERROR, "setText error. tk == nil", n.GetProgName(), n.WidgetId) return } @@ -29,10 +29,10 @@ func setText(n *tree.Node, a *widget.Action) { case widget.Checkbox: tk.uiCheckbox.SetText(name) case widget.Textbox: - if (tk.uiEntry != nil) { + if tk.uiEntry != nil { tk.uiEntry.SetText(name) } - if (tk.uiMultilineEntry != nil) { + if tk.uiMultilineEntry != nil { tk.uiMultilineEntry.SetText(name) } case widget.Label: @@ -52,7 +52,7 @@ func setText(n *tree.Node, a *widget.Action) { // try to find the string for i, s = range tk.val { log.Log(CHANGE, "i, s", i, s) - if (name == s) { + if name == s { tk.uiCombobox.SetSelected(i) log.Log(CHANGE, "setText() Dropdown worked.", name) return @@ -60,11 +60,11 @@ func setText(n *tree.Node, a *widget.Action) { } log.Log(ERROR, "setText() Dropdown did not find:", name) // if i == -1, then there are not any things in the menu to select - if (i == -1) { + if i == -1 { return } // if the string was never set, then set the dropdown to the last thing added to the menu - if (orig == -1) { + if orig == -1 { tk.uiCombobox.SetSelected(i) } case widget.Combobox: @@ -72,5 +72,5 @@ func setText(n *tree.Node, a *widget.Action) { default: log.Log(ERROR, "plugin Send() Don't know how to setText on", n.WidgetType, "yet", a.ActionType) } - log.Log(CHANGE, "setText() END with name =", ) + log.Log(CHANGE, "setText() END with name =") } |
