diff --git a/gui-debug.go b/gui-debug.go index 485f670..f9c230d 100644 --- a/gui-debug.go +++ b/gui-debug.go @@ -31,38 +31,50 @@ func debugClick(b *gui.GuiButton) { makeButton(box, nil, nil, "Generate", "SUBDOMAIN", nil) gui.HorizontalBreak(box) makeButton(box, nil, nil, "Create Subdomain Account", "ADD", addSubdomainClick) - box = gui.HardBox(gw, gui.Xaxis, "subdomain test") - makeButton(box, nil, nil, "ping", "SUBDOMAIN", runPingClick) - makeButton(box, nil, nil, "Cross platform shell test", "SUBDOMAIN", runTestExecClick) - makeButton(box, nil, nil, "Generate 3", "SUBDOMAIN", nil) - makeButton(box, nil, nil, "Generate 4", "SUBDOMAIN", nil) + hardXbox := gui.HardBox(gw, gui.Xaxis, "subdomain test") + Ybox1 := gui.NewBox(hardXbox, gui.Yaxis, "subdomain Y test") + Xbox1 := gui.NewBox(Ybox1, gui.Xaxis, "subdomain Y test") + makeButton(Xbox1, nil, nil, "ping", "SUBDOMAIN", runPingClick) + makeButton(Xbox1, nil, nil, "Cross platform shell test", "SUBDOMAIN", runTestExecClick) + makeButton(Xbox1, nil, nil, "Generate 3", "SUBDOMAIN", nil) + makeButton(Xbox1, nil, nil, "Generate 4", "SUBDOMAIN", nil) - box = gui.NewBox(box, gui.Yaxis, "subdomain Y test") - makeButton(box, nil, nil, "List all windows & tabs", "SUBDOMAIN", func (*gui.GuiButton) { + Ybox2 := gui.NewBox(hardXbox, gui.Yaxis, "subdomain Y test") + makeButton(Ybox2, nil, nil, "List all windows & tabs", "SUBDOMAIN", func (*gui.GuiButton) { log.Println("debugClick() Hide()") box := gw.BoxMap["MAINBOX"] box.Window.UiTab.Hide() }) - makeButton(box, nil, nil, "Hide all tabs", "SUBDOMAIN", func (*gui.GuiButton) { + makeButton(Ybox2, nil, nil, "Hide all tabs", "SUBDOMAIN", func (*gui.GuiButton) { log.Println("debugClick() Hide()") box := gw.BoxMap["MAINBOX"] box.Window.UiTab.Hide() }) - makeButton(box, nil, nil, "Hide sleep Show", "SUBDOMAIN", func (*gui.GuiButton) { + makeButton(Ybox2, nil, nil, "Hide sleep Show", "SUBDOMAIN", func (*gui.GuiButton) { log.Println("debugClick() Hide()") box := gw.BoxMap["MAINBOX"] box.Window.UiTab.Hide() time.Sleep(2000 * time.Millisecond) box.Window.UiTab.Show() }) - makeButton(box, nil, nil, "Destroy tab 0", "SUBDOMAIN", func (*gui.GuiButton) { + makeButton(Ybox2, nil, nil, "Destroy tab 0", "SUBDOMAIN", func (*gui.GuiButton) { log.Println("debugClick() Destroy(0)") box := gw.BoxMap["MAINBOX"] box.Window.UiTab.Delete(0) }) - makeButton(box, nil, nil, "Generate 76", "SUBDOMAIN", nil) - log.Println("debugClick() END box =", box) + makeButton(Ybox2, nil, nil, "Load the default test config file", "SUBDOMAIN", func (*gui.GuiButton) { + newConfig := loadDefaultConfig() + config.Accounts = newConfig.Accounts + }) + makeButton(Ybox2, nil, nil, "runtime.Stack() dump", "SUBDOMAIN", func (*gui.GuiButton) { + log.Println("\tATTEMPT FULL STACK DUMP") + buf := make([]byte, 1<<16) + runtime.Stack(buf, true) + log.Printf("%s", buf) + log.Println("\tFINISHED FULL STACK DUMP") + }) + makeButton(Ybox2, nil, nil, "Close the GUI", "SUBDOMAIN", nil) } func runPingClick(b *gui.GuiButton) {