summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--windowPatches.go9
1 files 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()
}