diff options
| author | Jeff Carr <[email protected]> | 2024-02-01 20:12:26 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-01 20:12:26 -0600 |
| commit | 13b0daed7cb950c1244a8e6e42523813178d4c7d (patch) | |
| tree | a11d0dd527b048a812749882c27c0c02fb57edb9 /widget.go | |
| parent | f2f43a2b0bba96b9b8ed15d7996ccfe0181f846a (diff) | |
restore STDOUT and STDERR on panic()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'widget.go')
| -rw-r--r-- | widget.go | 32 |
1 files changed, 0 insertions, 32 deletions
@@ -112,35 +112,3 @@ func (w *guiWidget) SetVisible(b bool) { } w.v.Visible = b } - -func addDropdown() *tree.Node { - n := new(tree.Node) - n.WidgetType = widget.Flag - n.WidgetId = 2222 - n.ParentId = 0 - - // store the internal toolkit information - tk := new(guiWidget) - tk.frame = true - tk.labelN = "DropBox text" - - tk.node = n - // copy the data from the action message - tk.node.State.Label = "DropBox" - - // set the name used by gocui to the id - tk.cuiName = "-1 dropbox" - - tk.color = &colorFlag - - // add this new widget on the binary tree - tk.parent = me.treeRoot.TK.(*guiWidget) - if tk.parent == nil { - panic("addDropdown() didn't get treeRoot guiWidget") - } else { - tk.parent.children = append(tk.parent.children, tk) - } - - n.TK = tk - return n -} |
