From da315467cc0311bf436306274b2434656276bf81 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 24 May 2019 19:45:03 -0700 Subject: [PATCH] remove more unused stuff Signed-off-by: Jeff Carr --- gui.go | 18 +++++++++--------- structs.go | 11 ++--------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/gui.go b/gui.go index 7e957d1..532e35a 100644 --- a/gui.go +++ b/gui.go @@ -126,8 +126,8 @@ func mouseClick(b *ButtonMap) { log.Println("gui.mouseClick() START b =", b) if (b != nil) { - if (b.Note == "createAddVmBox") { - log.Println("gui.mouseClick() createAddVmBox for b.AccNick =", b.AccNick) + if (b.Action == "createAddVmBox") { + log.Println("gui.mouseClick() createAddVmBox for b =", b) createAddVmBox(Data.cloudTab, "Create New Virtual Machine", mouseClick) return } @@ -160,8 +160,8 @@ func defaultButtonClick(button *ui.Button) { log.Println("Data.AllButtons =", key, foo) if Data.AllButtons[key].B == button { log.Println("\tBUTTON MATCHED") - log.Println("\tData.AllButtons[key].Name =", Data.AllButtons[key].Name) - log.Println("\tData.AllButtons[key].Note =", Data.AllButtons[key].Note) + // log.Println("\tData.AllButtons[key].Name =", Data.AllButtons[key].Name) + log.Println("\tData.AllButtons[key].Action =", Data.AllButtons[key].Action) if Data.AllButtons[key].custom != nil { log.Println("\tDOING CUSTOM FUNCTION") var tmp ButtonMap @@ -199,8 +199,8 @@ func CreateButton(name string, note string, custom func(*ButtonMap)) *ui.Button var newmap ButtonMap newmap.B = newB - newmap.Note = note - newmap.Name = name + newmap.Action = note + // newmap.Name = name newmap.custom = custom Data.AllButtons = append(Data.AllButtons, newmap) @@ -215,7 +215,7 @@ func CreateAccountButton(pbC *pb.Config_Account, custom func(*ButtonMap)) *ui.Bu var newmap ButtonMap newmap.B = newB newmap.Account = pbC - newmap.Note = "SHOW" + newmap.Action = "SHOW" // newmap.Name = name // newmap.AccNick = account newmap.custom = custom @@ -232,7 +232,7 @@ func CreateLoginButton(pbC *pb.Config_Account, custom func(*ButtonMap)) *ui.Butt var newmap ButtonMap newmap.B = newB newmap.Account = pbC - newmap.Note = "LOGIN" + newmap.Action = "LOGIN" // newmap.Name = name // newmap.AccNick = account newmap.custom = custom @@ -248,7 +248,7 @@ func CreateFontButton(name string, note string, custom func(*ButtonMap)) *ui.Fon var newmap ButtonMap newmap.FB = newB - newmap.Note = note + newmap.Action = note newmap.custom = custom Data.AllButtons = append(Data.AllButtons, newmap) diff --git a/structs.go b/structs.go index bcf33b4..19a0119 100644 --- a/structs.go +++ b/structs.go @@ -53,7 +53,6 @@ type GuiDataStructure struct { IPv6 string // account entry textboxes - AccNick string Config *pb.Config Current *pb.Config_Account @@ -100,15 +99,9 @@ type ButtonMap struct { B *ui.Button FB *ui.FontButton Account *pb.Config_Account + Action string // what type of button -// onClick func (int, string) -// onChanged func (int, string) custom func (*ButtonMap) - - pbVM *pb.Event_VM - Name string // the text on the button - Note string // what type of button - AccNick string // what account this button is for } // @@ -126,7 +119,7 @@ type RowData struct { Name string // what kind of row is this? Status string // status of the row? /* - // These may or may not be implementable + // TODO: These may or may not be implementable click func() // what function to call if the user clicks on it doubleclick func() // what function to call if the user double clicks on it */