From c15c731e7f7746dc5cd85cde4650a4e44a4837c7 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 30 May 2019 11:41:23 -0700 Subject: change CreateButton to rerturn *GuiButton Signed-off-by: Jeff Carr --- debug.go | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'debug.go') diff --git a/debug.go b/debug.go index a058c8a..51f438f 100644 --- a/debug.go +++ b/debug.go @@ -60,8 +60,10 @@ func addDebuggingButtons(wm *GuiWindow, vbox *ui.Box) { vbox.Append(ui.NewLabel("Debugging:"), false) vbox.Append(ui.NewColorButton(), false) - vbox.Append(CreateButton(wm, nil, nil, "Add Account", "ADD", nil), false) - vbox.Append(CreateButton(wm, nil, nil, "Quit", "QUIT", nil), false) + a := CreateButton(wm, nil, nil, "Add Account", "ADD", nil) + vbox.Append(a.B, false) + a = CreateButton(wm, nil, nil, "Quit", "QUIT", nil) + vbox.Append(a.B, false) // ATTEMPT TO ADD THE TABLE HERE add2button := ui.NewButton("Add a Test Table") @@ -72,12 +74,17 @@ func addDebuggingButtons(wm *GuiWindow, vbox *ui.Box) { vbox.Append(add2button, false) // ATTEMPT TO ADD THE TABLE HERE END - vbox.Append(CreateButton(wm, nil, nil, "Hide & Show Box1&2", "HIDE", runTestHide), false) - - vbox.Append(CreateButton(wm, nil, nil, "Close GUI", "QUIT", nil), false) - vbox.Append(CreateButton(wm, nil, nil, "DEBUG goroutines", "DEBUG", nil), false) - vbox.Append(CreateButton(wm, nil, nil, "xterm", "XTERM", runTestExecClick), false) - vbox.Append(CreateButton(wm, nil, nil, "Load test.json config file", "CONFIG", nil), false) + a = CreateButton(wm, nil, nil, "Hide & Show Box1&2", "HIDE", runTestHide) + vbox.Append(a.B, false) + + a = CreateButton(wm, nil, nil, "Close GUI", "QUIT", nil) + vbox.Append(a.B, false) + a = CreateButton(wm, nil, nil, "DEBUG goroutines", "DEBUG", nil) + vbox.Append(a.B, false) + a = CreateButton(wm, nil, nil, "xterm", "XTERM", runTestExecClick) + vbox.Append(a.B, false) + a = CreateButton(wm, nil, nil, "Load test.json config file", "CONFIG", nil) + vbox.Append(a.B, false) } func runTestHide(b *GuiButton) { -- cgit v1.2.3