TODO: delete windows (kindof)
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
9aa7dda6f9
commit
f6fe1a503f
8
main.go
8
main.go
|
@ -74,3 +74,11 @@ func delayedTabs() {
|
||||||
log.Println("delayedTabs() could have added a tab here\n")
|
log.Println("delayedTabs() could have added a tab here\n")
|
||||||
// jcarrWindow.AddTab("delayed tab", nil)
|
// jcarrWindow.AddTab("delayed tab", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func normalWindowClose(n *gui.Node) {
|
||||||
|
origlog.Println("TODO: close this window correctly and empty the node")
|
||||||
|
n.Dump()
|
||||||
|
name := n.Name
|
||||||
|
// TODO: this is probably some sort of terrible and wrong memory leak
|
||||||
|
delete(gui.Data.NodeMap, name)
|
||||||
|
}
|
||||||
|
|
|
@ -37,13 +37,6 @@ func tabResets(w *gui.Node) *gui.Node {
|
||||||
updateDNS(nil)
|
updateDNS(nil)
|
||||||
})
|
})
|
||||||
|
|
||||||
g1.AddButton("fontNode.GetText()", func (*gui.Node) {
|
|
||||||
if (fontNode != nil) {
|
|
||||||
fontsize = fontNode.GetText()
|
|
||||||
log.Println("set fontsize =", fontsize)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
aptGroup(newTab)
|
aptGroup(newTab)
|
||||||
newTab.MakeBasicControlsPage("testing stuff")
|
newTab.MakeBasicControlsPage("testing stuff")
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ func xtermSettings(w *gui.Node) {
|
||||||
gui.Config.Title = "Configure xterm"
|
gui.Config.Title = "Configure xterm"
|
||||||
gui.Config.Width = 105
|
gui.Config.Width = 105
|
||||||
gui.Config.Height = 105
|
gui.Config.Height = 105
|
||||||
gui.Config.Exit = nil
|
gui.Config.Exit = normalWindowClose
|
||||||
w = gui.NewWindow()
|
w = gui.NewWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,4 +50,11 @@ func xtermSettings(w *gui.Node) {
|
||||||
cmd := "xterm"
|
cmd := "xterm"
|
||||||
xterm(cmd)
|
xterm(cmd)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
gNode.AddButton("fontNode.GetText()", func (*gui.Node) {
|
||||||
|
if (fontNode != nil) {
|
||||||
|
fontsize = fontNode.GetText()
|
||||||
|
log.Println("set fontsize =", fontsize)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue