From bc15bd663e6ddc08c8a117324b1184d97aab9023 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 30 Jan 2025 19:05:21 -0600 Subject: shows state and dims the buttons --- windowPatches.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/windowPatches.go b/windowPatches.go index 6ea187b..4816316 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -154,10 +154,14 @@ func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) { r.psetgrid.NewLabel(pset.Name) r.psetgrid.NewLabel(pset.Comment) r.psetgrid.NewLabel(pset.GitAuthorName) - r.psetgrid.NewLabel(pset.State) + if pset.State == "BROKEN" { + r.psetgrid.NewLabel("Bad") + } else { + r.psetgrid.NewLabel("Good") + } var win *patchWindow - r.psetgrid.NewButton("View", func() { + b := r.psetgrid.NewButton("View", func() { // has the window already been created? if win != nil { win.Toggle() @@ -167,6 +171,9 @@ func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) { win = makePatchWindow(pset) win.Show() }) + if pset.State == "BROKEN" { + b.Disable() + } r.psetgrid.NextRow() } -- cgit v1.2.3