diff options
| author | Jeff Carr <[email protected]> | 2024-02-01 09:07:09 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-01 09:07:09 -0600 |
| commit | 09b3544d55a9713de7513c0b004bf1aaf8db05f2 (patch) | |
| tree | 18c4c1944fc597f1f54b20bcc70215bc2dd2be38 | |
| parent | a26018c86d16e2e70459b4a10e00b0cf024aaba8 (diff) | |
testing work
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | gui.go | 26 | ||||
| -rw-r--r-- | main.go | 3 |
2 files changed, 17 insertions, 12 deletions
@@ -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() { @@ -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) |
