variable rename

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-11 20:57:06 -07:00
parent 2330e0a2b6
commit 8b71cd76e5
1 changed files with 12 additions and 12 deletions

View File

@ -13,8 +13,8 @@ import "git.wit.com/wit/gui"
// import "github.com/davecgh/go-spew/spew" // import "github.com/davecgh/go-spew/spew"
var jwcmainwin *ui.Window var cloudwin *ui.Window
var jwcmaintab *ui.Tab var cloudtab *ui.Tab
var tabcount int var tabcount int
func makeCloudInfoBox() ui.Control { func makeCloudInfoBox() ui.Control {
@ -114,25 +114,25 @@ func makeCloudInfoBox() ui.Control {
} }
func setupCloudUI() { func setupCloudUI() {
jwcmainwin = ui.NewWindow("Cloud Control Panel", config.Int("width"), config.Int("height"), false) cloudwin = ui.NewWindow("Cloud Control Panel", config.Int("width"), config.Int("height"), false)
jwcmainwin.OnClosing(func(*ui.Window) bool { cloudwin.OnClosing(func(*ui.Window) bool {
ui.Quit() ui.Quit()
return true return true
}) })
ui.OnShouldQuit(func() bool { ui.OnShouldQuit(func() bool {
jwcmainwin.Destroy() cloudwin.Destroy()
return true return true
}) })
jwcmaintab = ui.NewTab() cloudtab = ui.NewTab()
jwcmainwin.SetChild(jwcmaintab) cloudwin.SetChild(cloudtab)
jwcmainwin.SetMargined(true) cloudwin.SetMargined(true)
tabcount = 0 tabcount = 0
jwcmaintab.Append("Cloud Info", makeCloudInfoBox()) cloudtab.Append("Cloud Info", makeCloudInfoBox())
jwcmaintab.SetMargined(tabcount, true) cloudtab.SetMargined(tabcount, true)
jwcmainwin.Show() cloudwin.Show()
} }
func add2() { func add2() {
@ -149,5 +149,5 @@ func add2() {
log.Println("Sleep for 2 seconds, then try to add new tabs") log.Println("Sleep for 2 seconds, then try to add new tabs")
time.Sleep(1 * 1000 * 1000 * 1000) time.Sleep(1 * 1000 * 1000 * 1000)
gui.AddTableTab(jwcmaintab, 1, "test seven", 7, parts) gui.AddTableTab(cloudtab, 1, "test seven", 7, parts)
} }