summaryrefslogtreecommitdiff
path: root/vmBox.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-30 11:41:23 -0700
committerJeff Carr <[email protected]>2019-05-30 11:41:23 -0700
commitc15c731e7f7746dc5cd85cde4650a4e44a4837c7 (patch)
tree00e2d9e481ac38afba46633614d608772e657a34 /vmBox.go
parent570cba0b613fd9e91bee7bc3162178dddfb1a5c3 (diff)
change CreateButton to rerturn *GuiButton
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'vmBox.go')
-rw-r--r--vmBox.go24
1 files changed, 16 insertions, 8 deletions
diff --git a/vmBox.go b/vmBox.go
index 0df525b..2f811e9 100644
--- a/vmBox.go
+++ b/vmBox.go
@@ -42,13 +42,20 @@ func CreateVmBox(wm *GuiWindow, tab *ui.Tab, vm *pb.Event_VM) {
hboxButtons.SetPadded(true)
vbox.Append(hboxButtons, false)
- hboxButtons.Append(CreateButton(wm, nil, vm, "Power On", "POWERON", nil), false)
- hboxButtons.Append(CreateButton(wm, nil, vm, "Power Off", "POWEROFF", nil), false)
- hboxButtons.Append(CreateButton(wm, nil, vm, "Destroy", "DESTROY", nil), false)
- hboxButtons.Append(CreateButton(wm, nil, vm, "ping", "PING", runPingClick), false)
- hboxButtons.Append(CreateButton(wm, nil, vm, "Console", "XTERM", runTestExecClick), false)
- hboxButtons.Append(CreateButton(wm, nil, vm, "Save", "SAVE", nil), false)
- hboxButtons.Append(CreateButton(wm, nil, vm, "Done", "DONE", nil), false)
+ a := CreateButton(wm, nil, vm, "Power On", "POWERON", nil)
+ hboxButtons.Append(a.B, false)
+ a = CreateButton(wm, nil, vm, "Power Off", "POWEROFF", nil)
+ hboxButtons.Append(a.B, false)
+ a = CreateButton(wm, nil, vm, "Destroy", "DESTROY", nil)
+ hboxButtons.Append(a.B, false)
+ a = CreateButton(wm, nil, vm, "ping", "PING", runPingClick)
+ hboxButtons.Append(a.B, false)
+ a = CreateButton(wm, nil, vm, "Console", "XTERM", runTestExecClick)
+ hboxButtons.Append(a.B, false)
+ a = CreateButton(wm, nil, vm, "Save", "SAVE", nil)
+ hboxButtons.Append(a.B, false)
+ a = CreateButton(wm, nil, vm, "Done", "DONE", nil)
+ hboxButtons.Append(a.B, false)
AddBoxToTab(vm.Name, tab, vbox)
}
@@ -86,7 +93,8 @@ func createAddVmBox(wm *GuiWindow, tab *ui.Tab, name string, b *GuiButton) {
hboxButtons.Append(AddButton(&newb, "Add Virtual Machine"), false)
// hboxButtons.Append(CreateButton(nil, nil, "Add Virtual Machine","CREATE",nil), false)
- hboxButtons.Append(CreateButton(wm, nil, nil, "Cancel", "CLOSE", nil), false)
+ a := CreateButton(wm, nil, nil, "Cancel", "CLOSE", nil)
+ hboxButtons.Append(a.B, false)
name += " (" + b.Account.Nick + ")"
AddBoxToTab(name, tab, vbox)