avoid window in window crash. TODO: make it work
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
c6f9119c2e
commit
c5ecf7ca32
4
place.go
4
place.go
|
@ -106,6 +106,10 @@ func place(p *tree.Node, n *tree.Node) bool {
|
|||
return true
|
||||
case widget.Window:
|
||||
log.Log(INFO, "Adding Something to Window", n.WidgetId, n.GetProgName())
|
||||
if n.WidgetType == widget.Window {
|
||||
log.Log(INFO, "TODO: make window in a window a tab", n.WidgetId, n.GetProgName())
|
||||
return true
|
||||
}
|
||||
ptk.uiWindow.SetChild(tk.uiControl)
|
||||
return true
|
||||
default:
|
||||
|
|
|
@ -3,6 +3,8 @@ package main
|
|||
import (
|
||||
"go.wit.com/dev/andlabs/ui"
|
||||
_ "go.wit.com/dev/andlabs/ui/winmanifest"
|
||||
"go.wit.com/log"
|
||||
"go.wit.com/widget"
|
||||
|
||||
"go.wit.com/toolkits/tree"
|
||||
)
|
||||
|
@ -33,7 +35,11 @@ func newWindow(p, n *tree.Node) {
|
|||
newt.uiControl = win
|
||||
|
||||
n.TK = newt
|
||||
if p.WidgetType == widget.Window {
|
||||
log.Log(WARN, "newWindow() TODO: make this window a tab")
|
||||
} else {
|
||||
place(p, n)
|
||||
}
|
||||
win.Show()
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue