map create vm tab to the account

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-26 23:37:08 -07:00
parent 34d081f856
commit 5c707c2f85
2 changed files with 3 additions and 2 deletions

2
gui.go
View File

@ -131,7 +131,7 @@ func mouseClick(b *ButtonMap) {
log.Println("\tgui.mouseClick() START b.Action =", b.Action) log.Println("\tgui.mouseClick() START b.Action =", b.Action)
if (b.Action == "createAddVmBox") { if (b.Action == "createAddVmBox") {
log.Println("\tgui.mouseClick() createAddVmBox for b =", b) log.Println("\tgui.mouseClick() createAddVmBox for b =", b)
createAddVmBox(Data.cloudTab, "Create New Virtual Machine") createAddVmBox(Data.cloudTab, "Create New Virtual Machine", b)
return return
} }
/* /*

View File

@ -356,7 +356,7 @@ func CreateVmBox(tab *ui.Tab, vm *pb.Event_VM) {
tab.SetMargined(0, true) tab.SetMargined(0, true)
} }
func createAddVmBox(tab *ui.Tab, name string) { func createAddVmBox(tab *ui.Tab, name string, b *ButtonMap) {
log.Println("createAddVmBox() START") log.Println("createAddVmBox() START")
vbox := ui.NewVerticalBox() vbox := ui.NewVerticalBox()
vbox.SetPadded(true) vbox.SetPadded(true)
@ -377,6 +377,7 @@ func createAddVmBox(tab *ui.Tab, name string) {
hboxButtons.Append(CreateButton(nil, nil, "Add Virtual Machine","ADD", nil), false) hboxButtons.Append(CreateButton(nil, nil, "Add Virtual Machine","ADD", nil), false)
hboxButtons.Append(CreateButton(nil, nil, "Cancel", "CLOSE", nil), false) hboxButtons.Append(CreateButton(nil, nil, "Cancel", "CLOSE", nil), false)
name += " (" + b.Account.Nick + ")"
tab.Append(name, vbox) tab.Append(name, vbox)
tab.SetMargined(0, true) tab.SetMargined(0, true)
} }