diff options
| author | Jeff Carr <[email protected]> | 2025-01-30 19:05:21 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-30 19:05:21 -0600 |
| commit | bc15bd663e6ddc08c8a117324b1184d97aab9023 (patch) | |
| tree | 97e012b9f279ed65a5395c32d0b59d19791c546a | |
| parent | 282215e7606752e414cbb243941f0643af3e5cf3 (diff) | |
shows state and dims the buttons
| -rw-r--r-- | windowPatches.go | 11 |
1 files 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() } |
