diff options
Diffstat (limited to 'windowPatches.go')
| -rw-r--r-- | windowPatches.go | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/windowPatches.go b/windowPatches.go index ae6a3b9..6ea187b 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -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() { |
