diff options
| author | Jeff Carr <[email protected]> | 2024-01-28 03:33:08 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-28 03:33:08 -0600 |
| commit | e678a5cc626c9cfdcb2f593b49598732052495cd (patch) | |
| tree | 56361aa3408154f325a4f21f5e1f21b15f361251 /widget.go | |
| parent | 1f3d664dbdee1b567f5b40e06c63c07c4667d5f4 (diff) | |
fake buttons have labels
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'widget.go')
| -rw-r--r-- | widget.go | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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" |
