parent
a26018c86d
commit
09b3544d55
26
gui.go
26
gui.go
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue