testing close window
This commit is contained in:
parent
b53e71ed9e
commit
656f706aa1
9
doGui.go
9
doGui.go
|
@ -76,6 +76,15 @@ func drawWindow(win *gadgets.BasicWindow) {
|
||||||
newwin.showTable(me.machines)
|
newwin.showTable(me.machines)
|
||||||
newwin.Show()
|
newwin.Show()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
grid.NewButton("ConfigSave(me.machines)", func() {
|
||||||
|
log.Info("saving config...")
|
||||||
|
me.machines.ConfigSave()
|
||||||
|
})
|
||||||
|
grid.NewButton("ConfigSave(me.machines2)", func() {
|
||||||
|
log.Info("saving config...")
|
||||||
|
me.machines2.ConfigSave()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tw *tableWindow) showTable(allm *zoopb.Machines) {
|
func (tw *tableWindow) showTable(allm *zoopb.Machines) {
|
||||||
|
|
4
main.go
4
main.go
|
@ -42,6 +42,10 @@ func main() {
|
||||||
log.Warn("load config failed", err)
|
log.Warn("load config failed", err)
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
|
if err := me.machines2.ConfigLoad(); err != nil {
|
||||||
|
log.Warn("load config failed", err)
|
||||||
|
os.Exit(-1)
|
||||||
|
}
|
||||||
// me.targets = make(map[string]string) // keep track of what versions the machines should be running
|
// me.targets = make(map[string]string) // keep track of what versions the machines should be running
|
||||||
me.upgrade = make(map[string]bool) // used to trigger upgrade attempts
|
me.upgrade = make(map[string]bool) // used to trigger upgrade attempts
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"go.wit.com/lib/gadgets"
|
"go.wit.com/lib/gadgets"
|
||||||
|
"go.wit.com/log"
|
||||||
|
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
)
|
)
|
||||||
|
@ -44,6 +45,7 @@ func (w *tableWindow) Show() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *tableWindow) Hide() {
|
func (w *tableWindow) Hide() {
|
||||||
|
log.Info("hide window here")
|
||||||
w.win.Hide()
|
w.win.Hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue