testing close window

This commit is contained in:
Jeff Carr 2025-02-18 14:58:16 -06:00
parent b53e71ed9e
commit 656f706aa1
3 changed files with 15 additions and 0 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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()
} }