diff options
| author | Jeff Carr <[email protected]> | 2019-06-01 14:16:00 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-06-01 14:16:00 -0700 |
| commit | 6822cc60f435cc065114ed6aef5a8a190b1144aa (patch) | |
| tree | b043ad2ac931ce2bce1b3022c486be968aa23e97 | |
| parent | a6886866a9c70b9dae58e5811c68e3824ce40a43 (diff) | |
compiles again
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | misc.go | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -14,18 +14,20 @@ import pb "git.wit.com/wit/witProtobuf" // 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) if (gw.UiTab == nil) { log.Println("ShowTab() gw.UiTab = nil THIS IS BAD") 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) - gw.BoxMap[tabname] = abox - gw.UiTab.InsertAt(title, 0, abox.UiBox) - gw.UiTab.SetMargined(0, true) + abox := window.MakeWindow(window) + window.BoxMap[tabname] = abox + window.UiTab.InsertAt(title, 0, abox.UiBox) + window.UiTab.SetMargined(0, true) + return window } func GuiInit() { |
