summaryrefslogtreecommitdiff
path: root/tabWindow.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-22 20:30:48 -0700
committerJeff Carr <[email protected]>2019-05-22 20:30:48 -0700
commit6984b0dbc06e2972f7847974fca1b8d8b59e60de (patch)
tree3fd80a8b917facceadc623d6c15629a85d9a5236 /tabWindow.go
parent23f110b5a271ea6b300536cc5189635f42c40b96 (diff)
all local variables are in Data{}
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tabWindow.go')
-rw-r--r--tabWindow.go32
1 files changed, 13 insertions, 19 deletions
diff --git a/tabWindow.go b/tabWindow.go
index 5543e8e..72e4109 100644
--- a/tabWindow.go
+++ b/tabWindow.go
@@ -8,12 +8,6 @@ import _ "github.com/andlabs/ui/winmanifest"
// import "github.com/davecgh/go-spew/spew"
-// var cloudWindow *ui.Window
-var cloudTab *ui.Tab
-var cloudBox *ui.Box
-var smallBox *ui.Box
-var state string
-
func buttonClick(i int, s string) {
log.Println("gui.buttonClick() i, s =", i, s)
log.Println("Figure out what to do here")
@@ -27,25 +21,25 @@ func buttonClick(i int, s string) {
}
func ShowAccountQuestionTab() {
- cloudTab.Delete(0)
+ Data.cloudTab.Delete(0)
log.Println("Sleep(1000)")
time.Sleep(1000 * time.Millisecond)
- smallBox = AddAccountQuestionBox(nil, buttonClick)
- cloudTab.InsertAt("New Account?", 0, smallBox)
- cloudTab.SetMargined(0, true)
+ Data.smallBox = AddAccountQuestionBox(nil, buttonClick)
+ Data.cloudTab.InsertAt("New Account?", 0, Data.smallBox)
+ Data.cloudTab.SetMargined(0, true)
}
func ShowAccountTab() {
- cloudTab.Delete(0)
+ Data.cloudTab.Delete(0)
log.Println("Sleep(1000)")
time.Sleep(1000 * time.Millisecond)
- smallBox = AddAccountBox(buttonClick)
- cloudTab.InsertAt("Add Account", 0, smallBox)
- cloudTab.SetMargined(0, true)
+ Data.smallBox = AddAccountBox(buttonClick)
+ Data.cloudTab.InsertAt("Add Account", 0, Data.smallBox)
+ Data.cloudTab.SetMargined(0, true)
}
func GoMainWindow() {
@@ -64,14 +58,14 @@ func makeCloudWindow() {
return true
})
- cloudTab = ui.NewTab()
- Data.cloudWindow.SetChild(cloudTab)
+ Data.cloudTab = ui.NewTab()
+ Data.cloudWindow.SetChild(Data.cloudTab)
Data.cloudWindow.SetMargined(true)
- cloudBox = ShowSplashBox(nil, nil, buttonClick)
+ Data.cloudBox = ShowSplashBox(nil, nil, buttonClick)
- cloudTab.Append("WIT Splash", cloudBox)
- cloudTab.SetMargined(0, true)
+ Data.cloudTab.Append("WIT Splash", Data.cloudBox)
+ Data.cloudTab.SetMargined(0, true)
Data.cloudWindow.Show()
Data.State = "splash"