summaryrefslogtreecommitdiff
path: root/windowPatches.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-30 19:00:57 -0600
committerJeff Carr <[email protected]>2025-01-30 19:00:57 -0600
commit282215e7606752e414cbb243941f0643af3e5cf3 (patch)
treed23a45b6dabbbae3feeee3b380348feba3c4cd0d /windowPatches.go
parentb60e7aa98b9d11ea441f6bc8c3e9c12a4a3c7966 (diff)
moved good/bad into the GUI
Diffstat (limited to 'windowPatches.go')
-rw-r--r--windowPatches.go25
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() {