summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/group.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-02-25 14:05:25 -0600
committerJeff Carr <[email protected]>2023-02-25 14:05:25 -0600
commitf3bb68396afa7452ecf1c8d4744c825a9d81057c (patch)
tree00b55a17cee7a8e2f795c479a84a844779993c1c /toolkit/andlabs/group.go
parent355e5ec968427c2b07b78fec12224f31a65df740 (diff)
The debugging window is finally useful
the gui enabled debugging works --gui-debug works from the command line The debug window can now select things debugging now includes widget types all the debug flags work finally working debugging flags via gui checkboxes add debian packaging rules use log() in the toolkit use a standard log() to simplify debugging flags add reference to 'GO Style Guide' use the same LICENSE from the GO developers. TODO: make this threadsafe TODO: fix plugin stuff Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/group.go')
-rw-r--r--toolkit/andlabs/group.go16
1 files changed, 7 insertions, 9 deletions
diff --git a/toolkit/andlabs/group.go b/toolkit/andlabs/group.go
index e93247a..1762b7f 100644
--- a/toolkit/andlabs/group.go
+++ b/toolkit/andlabs/group.go
@@ -1,8 +1,6 @@
package main
import (
- "log"
-
"git.wit.org/wit/gui/toolkit"
"github.com/andlabs/ui"
@@ -10,11 +8,11 @@ import (
)
func NewGroup(parentW *toolkit.Widget, w *toolkit.Widget) {
- log.Println("gui.andlabs.NewGroup()", w.Name)
+ log(debugToolkit, "gui.andlabs.NewGroup()", w.Name)
t := mapToolkits[parentW]
if (t == nil) {
- log.Println("go.andlabs.NewGroup() toolkit struct == nil. name=", parentW.Name, w.Name)
+ log(debugToolkit, "go.andlabs.NewGroup() toolkit struct == nil. name=", parentW.Name, w.Name)
listMap()
}
newt := t.NewGroup(w.Name)
@@ -25,9 +23,8 @@ func NewGroup(parentW *toolkit.Widget, w *toolkit.Widget) {
func (t andlabsT) NewGroup(title string) *andlabsT {
var newt andlabsT
- if (DebugToolkit) {
- log.Println("gui.Toolbox.NewGroup() create", title)
- }
+ log(debugToolkit, "gui.Toolbox.NewGroup() create", title)
+
g := ui.NewGroup(title)
g.SetMargined(margin)
@@ -36,8 +33,9 @@ func (t andlabsT) NewGroup(title string) *andlabsT {
} else if (t.uiWindow != nil) {
t.uiWindow.SetChild(g)
} else {
- log.Println("gui.ToolboxNode.NewGroup() node.UiBox == nil. I can't add a range UI element without a place to put it")
- log.Fatalln("probably could just make a box here?")
+ log(debugToolkit, "gui.ToolboxNode.NewGroup() node.UiBox == nil. I can't add a range UI element without a place to put it")
+ log(debugToolkit, "probably could just make a box here?")
+ exit("internal wit/gui error")
}
hbox := ui.NewVerticalBox()