diff --git a/main.go b/main.go index 9c8092f..1eada56 100644 --- a/main.go +++ b/main.go @@ -8,10 +8,6 @@ import ( ) func Main(f func()) { - log.Println("Starting gui.Main() (using gtk via andlabs/ui)") - log.Println("Starting gui.Main() (using gtk via andlabs/ui)") - log.Println("Starting gui.Main() (using gtk via andlabs/ui)") - log.Println("Starting gui.Main() (using gtk via andlabs/ui)") log.Println("Starting gui.Main() (using gtk via andlabs/ui)") ui.Main(f) } diff --git a/structs.go b/structs.go index 8a401ca..23a5ca8 100644 --- a/structs.go +++ b/structs.go @@ -24,10 +24,11 @@ type GuiConfig struct { Height int Exit func(*Node) - Debug bool - DebugNode bool - DebugTabs bool - DebugTable bool + Debug bool + DebugNode bool + DebugTabs bool + DebugTable bool + DebugWindow bool depth int counter int // used to make unique ID's diff --git a/window.go b/window.go index 5a1e8d1..1dadad7 100644 --- a/window.go +++ b/window.go @@ -135,7 +135,9 @@ func InitWindow(parent *Node, gw *GuiWindow, name string, axis int) *Node { } } if (box.node == nil) { - Data.ListChildren(true) + if (Config.Debug) { + Data.ListChildren(true) + } log.Println("InitWindow() box has a FUCKING nil node") fn := FindNode("full initTab") log.Println("InitWindow() fn =", fn) @@ -143,7 +145,9 @@ func InitWindow(parent *Node, gw *GuiWindow, name string, axis int) *Node { } if (newGuiWindow.node == nil) { - Data.ListChildren(true) + if (Config.Debug) { + Data.ListChildren(true) + } log.Println("InitWindow() newGuiWindow has a FUCKING nil node") // panic(-1) } @@ -153,8 +157,10 @@ func InitWindow(parent *Node, gw *GuiWindow, name string, axis int) *Node { box.Dump() panic(-1) } - box.Dump() - box.node.Dump() + if (Config.DebugWindow) { + box.Dump() + box.node.Dump() + } if (box.node != node) { log.Println("InitWindow() box.node != node. Hmmm....") log.Println("InitWindow() box.node != node. Hmmm....") @@ -168,8 +174,7 @@ func InitWindow(parent *Node, gw *GuiWindow, name string, axis int) *Node { panic(-1) } if (node.uiTab == nil) { - // DebugNodeChildren() - // panic("node.uiTab = nil") + panic("node.uiTab = nil") } return node } @@ -372,7 +377,6 @@ func mapWindow(parent *Node, window *ui.Window, title string, x int, y int) *Nod return nil } - log.Println("gui.WindowMap START title =", title) var newGuiWindow GuiWindow newGuiWindow.Width = x newGuiWindow.Height = y