summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-31 12:57:54 -0500
committerJeff Carr <[email protected]>2021-10-31 12:57:54 -0500
commitd38d60bcc38b6983e56283a16bc1a7c5b9c0e9ee (patch)
tree53b489c9df4ea1784be0d626df1497b04183c9be /window.go
parentad3c3e8369ce6e62dbe9f8bacecf036d276dda8e (diff)
NODE: resurrect 'ssh' window
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'window.go')
-rw-r--r--window.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/window.go b/window.go
index 40c4443..403638e 100644
--- a/window.go
+++ b/window.go
@@ -184,23 +184,26 @@ func NewWindow() *Node {
w := Config.Width
h := Config.Height
- var node *Node
- node = mapWindow(nil, nil, title, w, h)
- box := node.box
+ var n *Node
+ n = mapWindow(nil, nil, title, w, h)
+ box := n.box
log.Println("gui.NewWindow() title = box.Name =", box.Name)
- node.uiNewWindow(box.Name, w, h)
- window := node.uiWindow
+ n.uiNewWindow(box.Name, w, h)
+ window := n.uiWindow
f := Config.Exit
ui.OnShouldQuit(func() bool {
- log.Println("createWindow().Destroy() on node.Name =", node.Name)
+ log.Println("createWindow().Destroy() on node.Name =", n.Name)
if (f != nil) {
- f(node)
+ f(n)
}
return true
})
box.Window.UiWindow = window
- return node
+ if(n.uiWindow == nil) {
+ panic("node.uiWindow == nil. This should never happen")
+ }
+ return n
}