apply mbox button

This commit is contained in:
Jeff Carr 2025-01-30 19:19:05 -06:00
parent bc15bd663e
commit 25fe17d59c
1 changed files with 7 additions and 2 deletions

View File

@ -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()
}