submit-patchset/main.go

53 lines
1.1 KiB
Go

package main
// An app to submit patches for the 30 GO GUI repos
import (
"go.wit.com/lib/gadgets"
"go.wit.com/log"
"go.wit.com/gui"
)
func main() {
me = new(mainType)
me.myGui = gui.New().Default()
me.mainWindow = gadgets.RawBasicWindow("submit & test patchsets")
me.mainWindow.Make()
me.mainWindow.Show()
me.mainbox = me.mainWindow.Box()
vbox1 := me.mainbox.NewVerticalBox("BOX1")
globalDisplayOptions(vbox1)
// disable the interface while everything is scanned
me.Disable()
vbox2 := me.mainbox.NewVerticalBox("BOX2")
globalBuildOptions(vbox2)
me.summary = submitPatchesBox(vbox2)
me.repos = makeRepoView()
// parse config file and scan for .git repos
me.repos.initRepoList()
// reads in the State of all the repos
// TODO: should not really be necessary directly after init()
me.repos.View.ScanRepositories()
// processing is done. update the repo summary box
me.summary.Update()
me.Enable()
// intermittently scans the status indefinitly
me.repos.View.Watchdog(func() {
log.Info("In main()")
// processing is done. update the repo summary box
me.summary.Update()
})
}