From 8b71cd76e559b4299c7bae51a0f67cf525fb2b90 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 11 May 2019 20:57:06 -0700 Subject: [PATCH] variable rename Signed-off-by: Jeff Carr --- infoTabUI.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/infoTabUI.go b/infoTabUI.go index 7ea22c6..319295d 100644 --- a/infoTabUI.go +++ b/infoTabUI.go @@ -13,8 +13,8 @@ import "git.wit.com/wit/gui" // import "github.com/davecgh/go-spew/spew" -var jwcmainwin *ui.Window -var jwcmaintab *ui.Tab +var cloudwin *ui.Window +var cloudtab *ui.Tab var tabcount int func makeCloudInfoBox() ui.Control { @@ -114,25 +114,25 @@ func makeCloudInfoBox() ui.Control { } func setupCloudUI() { - jwcmainwin = ui.NewWindow("Cloud Control Panel", config.Int("width"), config.Int("height"), false) - jwcmainwin.OnClosing(func(*ui.Window) bool { + cloudwin = ui.NewWindow("Cloud Control Panel", config.Int("width"), config.Int("height"), false) + cloudwin.OnClosing(func(*ui.Window) bool { ui.Quit() return true }) ui.OnShouldQuit(func() bool { - jwcmainwin.Destroy() + cloudwin.Destroy() return true }) - jwcmaintab = ui.NewTab() - jwcmainwin.SetChild(jwcmaintab) - jwcmainwin.SetMargined(true) + cloudtab = ui.NewTab() + cloudwin.SetChild(cloudtab) + cloudwin.SetMargined(true) tabcount = 0 - jwcmaintab.Append("Cloud Info", makeCloudInfoBox()) - jwcmaintab.SetMargined(tabcount, true) + cloudtab.Append("Cloud Info", makeCloudInfoBox()) + cloudtab.SetMargined(tabcount, true) - jwcmainwin.Show() + cloudwin.Show() } func add2() { @@ -149,5 +149,5 @@ func add2() { log.Println("Sleep for 2 seconds, then try to add new tabs") time.Sleep(1 * 1000 * 1000 * 1000) - gui.AddTableTab(jwcmaintab, 1, "test seven", 7, parts) + gui.AddTableTab(cloudtab, 1, "test seven", 7, parts) }