summaryrefslogtreecommitdiff
path: root/windowPatches.go
diff options
context:
space:
mode:
Diffstat (limited to 'windowPatches.go')
-rw-r--r--windowPatches.go28
1 files changed, 18 insertions, 10 deletions
diff --git a/windowPatches.go b/windowPatches.go
index 4839f3d..4642d4d 100644
--- a/windowPatches.go
+++ b/windowPatches.go
@@ -94,10 +94,15 @@ func (r *patchesWindow) initWindow() {
return
}
slices.Reverse(lines)
+ count := 0
for i, line := range lines {
log.Info(i, line)
- r.addPatchset(line)
+ count += 1
+ if count < 10 {
+ r.addPatchset(line)
+ }
}
+ log.Info("Total patchsets:", count)
}
func (r *patchesWindow) addPatchset(line string) {
@@ -109,14 +114,16 @@ func (r *patchesWindow) addPatchset(line string) {
r.setgrid.NewLabel(name)
r.setgrid.NewLabel(subject)
r.setgrid.NewLabel(author)
- r.setgrid.NewButton("Download", func() {
- pset, err := savePatch(name)
- if err != nil {
- log.Info(name, "failed to download", err)
- return
- }
- r.setlist[name] = pset
- })
+ /*
+ r.setgrid.NewButton("Download", func() {
+ pset, err := savePatch(name)
+ if err != nil {
+ log.Info(name, "failed to download", err)
+ return
+ }
+ r.setlist[name] = pset
+ })
+ */
r.setgrid.NewButton("View", func() {
// has the window already been created?
win := r.setwin[name]
@@ -134,6 +141,7 @@ func (r *patchesWindow) addPatchset(line string) {
}
r.setlist[name] = pset
r.setwin[name] = makePatchWindow(pset)
+ r.setwin[name].Show()
})
r.setgrid.NewButton("Dump", func() {
pset := r.setlist[name]
@@ -146,7 +154,7 @@ func (r *patchesWindow) addPatchset(line string) {
return
}
})
- r.setgrid.NewButton("Save", func() {
+ r.setgrid.NewButton("Extract", func() {
pset := r.setlist[name]
if pset == nil {
log.Info(name, "was nil")