forge/doGui.go

71 lines
1.4 KiB
Go
Raw Normal View History

2024-12-05 12:29:47 -06:00
package main
// An app to submit patches for the 30 GO GUI repos
import (
2025-01-19 02:56:48 -06:00
"os"
2024-12-05 12:29:47 -06:00
"go.wit.com/gui"
2025-01-08 04:07:33 -06:00
"go.wit.com/lib/debugger"
2024-12-05 12:29:47 -06:00
"go.wit.com/lib/gadgets"
"go.wit.com/log"
)
2025-01-08 04:07:33 -06:00
func debug() {
log.Info("cmd line --debugger == true")
go func() {
log.Sleep(3)
log.Info("cmd line --debugger == true")
log.Info("cmd line --debugger == true")
log.Info("cmd line --debugger == true")
log.Info("cmd line --debugger == true")
debugger.DebugWindow()
}()
}
2024-12-05 12:29:47 -06:00
func doGui() {
me.myGui = gui.New()
me.myGui.Default()
2025-01-08 04:07:33 -06:00
// debug()
2025-01-20 02:14:08 -06:00
me.patchWin = new(patchesWindow)
2025-01-20 02:30:31 -06:00
me.mainWindow = gadgets.RawBasicWindow("Forge: (this kinda works sometimes)")
2024-12-05 12:29:47 -06:00
me.mainWindow.Make()
me.mainWindow.Show()
2025-01-19 02:56:48 -06:00
me.mainWindow.Custom = func() {
log.Warn("MAIN WINDOW CLOSE")
count := me.forge.RillReload()
log.Info("Repo Reload count =", count)
if count != 0 {
me.forge.ConfigSave()
}
os.Exit(0)
}
2024-12-05 12:29:47 -06:00
me.mainbox = me.mainWindow.Box()
// disable the interface while everything is scanned
me.Disable()
vbox2 := me.mainbox.NewVerticalBox("BOX2")
globalBuildOptions(vbox2)
me.summary = submitPatchesBox(vbox2)
me.repos = makeRepoView()
// processing is done. update the repo summary box
me.summary.Update()
me.summary.submitB.Disable()
2024-12-05 12:29:47 -06:00
me.Enable()
// intermittently scans the status indefinitly
me.repos.View.Watchdog(func() {
log.Info("Watchdog in doGui()")
2024-12-05 12:29:47 -06:00
// processing is done. update the repo summary box
me.summary.Update()
})
}