From 7da54784fbc50a034dafe3f004b818a88f934301 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 14 Jun 2019 15:41:30 -0700 Subject: [PATCH] don't use Data.Windows anymore Signed-off-by: Jeff Carr --- debug.go | 2 ++ structs.go | 3 ++- window.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debug.go b/debug.go index f1fdf92..b206cef 100644 --- a/debug.go +++ b/debug.go @@ -67,6 +67,7 @@ func DumpBoxes() { } } } + /* for i, window := range Data.Windows { if (window.TabNumber == nil) { log.Println("gui.DumpBoxes() Data.Windows", i, "Name =", window.Name, "TabNumber = nil") @@ -74,6 +75,7 @@ func DumpBoxes() { log.Println("gui.DumpBoxes() Data.Windows", i, "Name =", window.Name, "TabNumber =", *window.TabNumber) } } + */ } func addTableTab() { diff --git a/structs.go b/structs.go index 0f02147..90a674b 100644 --- a/structs.go +++ b/structs.go @@ -28,9 +28,10 @@ type GuiData struct { // A map of all the entry boxes AllEntries []*GuiEntry - Windows []*GuiWindow WindowMap map[string]*GuiWindow + // Windows []*GuiWindow + // A map of all buttons everywhere on all // windows, all tabs, across all goroutines // This is "GLOBAL" diff --git a/window.go b/window.go index ab12bff..aaf140a 100644 --- a/window.go +++ b/window.go @@ -100,7 +100,7 @@ func InitWindow(gw *GuiWindow, name string, axis int) *GuiBox { newGuiWindow.BoxMap = make(map[string]*GuiBox) newGuiWindow.EntryMap = make(map[string]*GuiEntry) - Data.Windows = append(Data.Windows, &newGuiWindow) + // Data.Windows = append(Data.Windows, &newGuiWindow) if (newGuiWindow.UiTab == nil) { tabnum := 0