From 25fe17d59cd4081ac1204e9686859af773bd69c1 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 30 Jan 2025 19:19:05 -0600 Subject: apply mbox button --- windowPatches.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/windowPatches.go b/windowPatches.go index 4816316..423aae5 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -161,7 +161,7 @@ func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) { } var win *patchWindow - b := r.psetgrid.NewButton("View", func() { + r.psetgrid.NewButton("View", func() { // has the window already been created? if win != nil { win.Toggle() @@ -171,8 +171,13 @@ func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) { win = makePatchWindow(pset) win.Show() }) + if pset.State == "BROKEN" { - b.Disable() + // a.Disable() + } else { + r.psetgrid.NewButton("Apply (git am)", func() { + applyPatchset(pset) + }) } r.psetgrid.NextRow() } -- cgit v1.2.3