summaryrefslogtreecommitdiff
path: root/windowPatches.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-29 11:23:34 -0600
committerJeff Carr <[email protected]>2025-01-29 12:18:16 -0600
commit54b50299f394b45da0f46bf47715cac79ca837f0 (patch)
treecdbeb0950b86005f0cc9ef0f026addd6811f1b37 /windowPatches.go
parente548b0fb6d0d14cdfb693850d592419f247dc2b1 (diff)
slim down this window to keep it functional
Diffstat (limited to 'windowPatches.go')
-rw-r--r--windowPatches.go50
1 files changed, 1 insertions, 49 deletions
diff --git a/windowPatches.go b/windowPatches.go
index 4642d4d..decd2ab 100644
--- a/windowPatches.go
+++ b/windowPatches.go
@@ -114,16 +114,7 @@ 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("View", func() {
// has the window already been created?
win := r.setwin[name]
@@ -143,44 +134,5 @@ func (r *patchesWindow) addPatchset(line string) {
r.setwin[name] = makePatchWindow(pset)
r.setwin[name].Show()
})
- r.setgrid.NewButton("Dump", func() {
- pset := r.setlist[name]
- if pset == nil {
- log.Info(name, "was nil")
- return
- }
- if !dumpPatchset(pset) {
- log.Info("Dump: some patches are bad", name)
- return
- }
- })
- r.setgrid.NewButton("Extract", func() {
- pset := r.setlist[name]
- if pset == nil {
- log.Info(name, "was nil")
- return
- }
- if err := savePatchset(pset); err != nil {
- log.Info("Save: some patches are bad", name, err)
- return
- }
- })
- r.setgrid.NewButton("Apply", func() {
- pset := r.setlist[name]
- if pset == nil {
- log.Info(name, "was nil")
- return
- }
- if _, _, _, err := IsEverythingOnDevel(); err != nil {
- log.Info("You can only apply patches to the devel branch")
- return
- }
- if IsAnythingDirty() {
- log.Info("You can't apply patches when repos are dirty")
- me.forge.PrintHumanTable(me.found)
- return
- }
- applyPatchset(pset)
- })
r.setgrid.NextRow()
}