parent
6a0467f5a8
commit
f85cb5c0f0
14
misc.go
14
misc.go
|
@ -14,18 +14,20 @@ import pb "git.wit.com/wit/witProtobuf"
|
||||||
|
|
||||||
// THIS IS NOT CLEAN (almost?)
|
// THIS IS NOT CLEAN (almost?)
|
||||||
|
|
||||||
func ShowTab(gw *GuiWindow, tabname string, title string) {
|
func ShowTab(gw *GuiWindow, tabname string, title string) *GuiWindow {
|
||||||
log.Println("ShowTab() gw =", gw)
|
log.Println("ShowTab() gw =", gw)
|
||||||
if (gw.UiTab == nil) {
|
if (gw.UiTab == nil) {
|
||||||
log.Println("ShowTab() gw.UiTab = nil THIS IS BAD")
|
log.Println("ShowTab() gw.UiTab = nil THIS IS BAD")
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
gw.UiTab.Delete(0)
|
window := InitGuiWindow(Data.Config, tabname, gw.MakeWindow, gw.UiWindow, gw.UiTab)
|
||||||
|
window.UiTab.Delete(0)
|
||||||
|
|
||||||
abox := gw.MakeWindow(gw)
|
abox := window.MakeWindow(window)
|
||||||
gw.BoxMap[tabname] = abox
|
window.BoxMap[tabname] = abox
|
||||||
gw.UiTab.InsertAt(title, 0, abox.UiBox)
|
window.UiTab.InsertAt(title, 0, abox.UiBox)
|
||||||
gw.UiTab.SetMargined(0, true)
|
window.UiTab.SetMargined(0, true)
|
||||||
|
return window
|
||||||
}
|
}
|
||||||
|
|
||||||
func GuiInit() {
|
func GuiInit() {
|
||||||
|
|
Loading…
Reference in New Issue