summaryrefslogtreecommitdiff
path: root/widget.go
diff options
context:
space:
mode:
Diffstat (limited to 'widget.go')
-rw-r--r--widget.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/widget.go b/widget.go
index 9c2a5c2..47b7fe2 100644
--- a/widget.go
+++ b/widget.go
@@ -18,6 +18,10 @@ func initWidget(n *tree.Node) *guiWidget {
w.node = n
w.WidgetType = n.WidgetType
+ w.labelN = n.State.Label
+ if w.labelN == "" {
+ w.labelN = n.GetProgName()
+ }
if n.WidgetType == widget.Root {
log.Log(INFO, "setupWidget() FOUND ROOT w.id =", n.WidgetId)
@@ -104,7 +108,7 @@ func (w *guiWidget) IsCurrent() bool {
}
func (tk *guiWidget) String() string {
- return tk.progname
+ return tk.node.String()
}
func (tk *guiWidget) Visible() bool {
@@ -160,10 +164,10 @@ func addDropdown() *tree.Node {
// store the internal toolkit information
tk := new(guiWidget)
tk.frame = true
- tk.label = "DropBox text"
+ tk.labelN = "DropBox text"
// copy the data from the action message
- tk.progname = "DropBox"
+ tk.node.State.Label = "DropBox"
// set the name used by gocui to the id
tk.cuiName = "-1 dropbox"