testing work

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-02-01 09:07:09 -06:00
parent a26018c86d
commit 09b3544d55
2 changed files with 17 additions and 12 deletions

26
gui.go
View File

@ -33,23 +33,29 @@ func setupControlPanelWindow(title string) {
me.window.Draw()
}
func debugTab(title string) {
// var g2 *gui.Node
func debugTab(title string) *gadgets.BasicWindow {
if me.debug != nil {
return me.debug
}
me.debug = gadgets.NewBasicWindow(me.myGui, title)
me.debug.Make()
win := gadgets.NewBasicWindow(me.myGui, title)
win.Make()
group := me.debug.Box().NewGroup("Real Stuff")
group := win.Box().NewGroup("Real Stuff")
group.NewButton("GO GUI Debug Window", func() {
debugger.DebugWindow()
})
group.NewButton("Logging Settings", func() {
logsettings.LogWindow()
})
group.NewButton("dig A & AAAA DNS records (updateDNS())", func() {
log.Log(CHANGE, "updateDNS() going to run:")
})
group = me.debug.Box().NewGroup("debugging options")
group = win.Box().NewGroup("debugging options")
grid := group.NewGrid("nuts", 2, 1)
// makes a slider widget
@ -74,6 +80,8 @@ func debugTab(title string) {
newGrid.NewLabel("ping6.wit.com =")
newGrid.NewLabel("unknown")
return win
}
func myDefaultExit(n *gui.Node) {
@ -91,16 +99,12 @@ func makeMainWindow() {
statusGrid(hbox)
// some artificial padding to make the last row of buttons look less wierd
group := hbox.NewGroup("Development and Debugging Windows")
group := hbox.NewGroup("Under Development")
group.NewButton("Debug", func() {
me.debug.Toggle()
})
group.NewButton("Logging Settings", func() {
logsettings.LogWindow()
})
me.showErrorsB = group.NewCheckbox("Show Errors").SetChecked(true)
me.showErrorsB.Custom = func() {
if me.showErrorsB.Checked() {

View File

@ -48,7 +48,8 @@ func main() {
// setupControlPanelWindow()
// setup the main tab
setupControlPanelWindow("DNS and IPv6 Control Panel")
debugTab("Debug")
me.debug = debugTab("Debug")
// TODO: track this bug down
log.Sleep(1)