summaryrefslogtreecommitdiff
path: root/windowSummary.go
diff options
context:
space:
mode:
Diffstat (limited to 'windowSummary.go')
-rw-r--r--windowSummary.go24
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)
}
})