more fixes on tracking the window
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
ebfab08357
commit
d20e7cea65
|
@ -15,6 +15,7 @@ func makeCloudInfoBox(gw *gui.GuiWindow) {
|
|||
log.Println("gui.InitWindow() FAILED")
|
||||
return
|
||||
}
|
||||
gw = box.Window
|
||||
|
||||
log.Println("makeCloudInfoBox() START GW IS NOW: gw =", gw)
|
||||
log.Println("makeCloudInfoBox() box =", box)
|
||||
|
@ -24,7 +25,6 @@ func makeCloudInfoBox(gw *gui.GuiWindow) {
|
|||
tmp := config.Hostname + " (" + config.IPv6 + ")"
|
||||
gui.MakeEntryHbox(box, "hostname:", tmp, true, "Hostname")
|
||||
|
||||
// box = gui.HardBox(gw, gui.Yaxis)
|
||||
for key, a := range config.Accounts {
|
||||
vbox := gui.NewBox(box, gui.Xaxis, fmt.Sprintf("ACCOUNT %d", key))
|
||||
log.Println("account = ", key, a)
|
||||
|
@ -47,10 +47,10 @@ func makeCloudInfoBox(gw *gui.GuiWindow) {
|
|||
gui.NewLabel(vbox, name)
|
||||
}
|
||||
|
||||
Xbox := gui.HardBox(gw, gui.Xaxis, "subdomain test")
|
||||
Xbox := gui.HardBox(box.Window, gui.Xaxis, "subdomain test")
|
||||
makeButton(Xbox, nil, nil, "Add Account", "ADD TAB", func (*gui.GuiButton) {
|
||||
log.Println("makeCloudInfoBox() Add Account")
|
||||
createAccount(gw)
|
||||
createAccount(box.Window)
|
||||
})
|
||||
makeButton(Xbox, nil, nil, "Quit", "QUIT", nil)
|
||||
makeButton(Xbox, nil, nil, "Debug", "DEBUG", debugClick)
|
||||
|
@ -60,7 +60,6 @@ func makeCloudInfoBox(gw *gui.GuiWindow) {
|
|||
func createAccount(gw *gui.GuiWindow) {
|
||||
box := gui.InitWindow(gw, "Create New Account", gui.Yaxis)
|
||||
if (box == nil) { return }
|
||||
|
||||
gw = box.Window
|
||||
|
||||
// make a place for someone to enter their subdomain
|
||||
|
|
|
@ -108,6 +108,7 @@ func showAccountClick(b *gui.GuiButton) {
|
|||
log.Println("gui.InitWindow() FAILED")
|
||||
return
|
||||
}
|
||||
gw = box.Window
|
||||
|
||||
event := pb.MakeGetEvent()
|
||||
event.Account = values.Account
|
||||
|
|
|
@ -21,6 +21,7 @@ func debugClick(b *gui.GuiButton) {
|
|||
|
||||
box := gui.InitWindow(gw, "Debugging", gui.Yaxis)
|
||||
if (box == nil) { return }
|
||||
gw = box.Window
|
||||
log.Println("debugClick() initWindow() END")
|
||||
|
||||
makeButton(box, nil, nil, "empty", "SUBDOMAIN", nil)
|
||||
|
@ -67,6 +68,10 @@ func debugClick(b *gui.GuiButton) {
|
|||
box := gw.BoxMap["MAINBOX"]
|
||||
box.Window.UiTab.Delete(0)
|
||||
})
|
||||
makeButton(Ybox2, nil, nil, "Destroy Splash", "SUBDOMAIN", func (*gui.GuiButton) {
|
||||
log.Println("debugClick() Destroy(0)")
|
||||
gui.DeleteWindow("Cloud Accounts")
|
||||
})
|
||||
|
||||
makeButton(Ybox2, nil, nil, "Load the default test config file", "SUBDOMAIN", func (*gui.GuiButton) {
|
||||
newConfig := loadDefaultConfig()
|
||||
|
|
|
@ -94,6 +94,7 @@ func createAddVmBox(b *gui.GuiButton) {
|
|||
log.Println("initWindow() FAILED")
|
||||
return
|
||||
}
|
||||
gw = box.Window
|
||||
box = gui.HardBox(gw, gui.Xaxis, txt)
|
||||
// box := gui.AddGenericBox(gw, name)
|
||||
|
||||
|
@ -128,6 +129,7 @@ func createVmBox(gw *gui.GuiWindow, vm *pb.Event_VM) {
|
|||
log.Println("initWindow() FAILED")
|
||||
return
|
||||
}
|
||||
gw = box.Window
|
||||
box = gui.HardBox(gw, gui.Xaxis, txt)
|
||||
|
||||
// Add hostname entry box
|
||||
|
|
Loading…
Reference in New Issue