moved good/bad into the GUI

This commit is contained in:
Jeff Carr 2025-01-30 19:00:57 -06:00
parent b60e7aa98b
commit 282215e760
3 changed files with 23 additions and 10 deletions

View File

@ -49,9 +49,9 @@ func doGui() {
// this is just interesting to see how fast it is on various boxes
// and with how many repos you are working with. On my current laptop
// I have 320 repos and when I'm using it and most things are in memory
// cache, it takes around
// 13G 424266 total files
// cache, it took: rill repos.Reload() took (2ms)
// which is hard to believe when my ~/go/src is 13G with 424266 files
// nevermind, there must be something wrong with the code right now
log.Printf("rill repos.Reload() took (%s)\n", shell.FormatDuration(time.Since(now)))
os.Exit(0)
}

View File

@ -39,7 +39,7 @@ func doPatch() error {
func doPatchList() error {
psets, err := openPatchsets()
if err != nil {
log.Info("Get Patchsets failed", err)
log.Info("Open Patchsets failed", err)
return err
}
log.Info("got psets len", len(psets.Patchsets))

View File

@ -63,11 +63,6 @@ func (r *patchesWindow) initWindow() {
// update the stats about the repos and patches
r.Update()
g := r.stack.NewGroup("Patchset List")
// add the grid
r.psetgrid = g.RawGrid()
}
func (r *patchesWindow) submitPatchesBox() {
@ -133,15 +128,33 @@ func (r *patchesWindow) submitPatchesBox() {
}
}
})
r.submitB.Disable()
grid.NextRow()
g := r.stack.NewGroup("Patchset List")
// add the grid
r.psetgrid = g.RawGrid()
psets, err := openPatchsets()
if err != nil {
log.Info("Open Patchsets failed", err)
// return err
} else {
log.Info("got psets len", len(psets.Patchsets))
all := psets.SortByName()
for all.Scan() {
pset := all.Next()
// log.Info("pset name =", pset.Name)
r.addPatchsetNew(pset)
}
}
}
func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) {
r.psetgrid.NewLabel(pset.Name)
r.psetgrid.NewLabel(pset.Comment)
r.psetgrid.NewLabel(pset.GitAuthorName)
r.psetgrid.NewLabel(pset.State)
var win *patchWindow
r.psetgrid.NewButton("View", func() {