NODE: TODO: refactor InitWindow to use NewWindow()
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
a678fcd2ad
commit
c74e39a9ef
4
main.go
4
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)
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ type GuiConfig struct {
|
|||
DebugNode bool
|
||||
DebugTabs bool
|
||||
DebugTable bool
|
||||
DebugWindow bool
|
||||
|
||||
depth int
|
||||
counter int // used to make unique ID's
|
||||
|
|
10
window.go
10
window.go
|
@ -135,7 +135,9 @@ func InitWindow(parent *Node, gw *GuiWindow, name string, axis int) *Node {
|
|||
}
|
||||
}
|
||||
if (box.node == nil) {
|
||||
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) {
|
||||
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)
|
||||
}
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue