diff options
| author | Jeff Carr <[email protected]> | 2025-01-28 13:20:10 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-28 13:20:10 -0600 |
| commit | 91c28de514b1a41e2355714f5352f5438dbe34a2 (patch) | |
| tree | fbf0c71cecc509195501be13a26dd07c0d026706 /windowSummary.go | |
| parent | 3b6e84abdfdff7181c1eb9553a6c6589d6ba027a (diff) | |
make a patchset grid widget
Diffstat (limited to 'windowSummary.go')
| -rw-r--r-- | windowSummary.go | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/windowSummary.go b/windowSummary.go index ac066b7..f54051c 100644 --- a/windowSummary.go +++ b/windowSummary.go @@ -35,7 +35,7 @@ type patchSummary struct { // allp []*repolist.Patch } -func submitPatchesBox(box *gui.Node) *patchSummary { +func (r *patchesWindow) submitPatchesBox(box *gui.Node) *patchSummary { s := new(patchSummary) group1 := box.NewGroup("Patch Summary") s.grid = group1.RawGrid() @@ -75,26 +75,14 @@ func submitPatchesBox(box *gui.Node) *patchSummary { }) s.grid.NewButton("List Patchsets", func() { - if err := listPatches(); err != nil { - log.Info(err) - } - }) - - s.grid.NewButton("Show Latest Patchset", func() { - lastp := lastPatch() - pset, err := getPatch(lastp) + lines, err := listPatches() if err != nil { + log.Info(err) return } - - if !dumpPatchset(pset) { - log.Info("some patches are bad") - return - } - if IsAnythingDirty() { - log.Info("You can't apply patches when repos are dirty") - me.forge.PrintHumanTable(me.found) - return + for i, line := range lines { + log.Info(i, line) + r.addPatchset(line) } }) |
