shows state and dims the buttons
This commit is contained in:
parent
282215e760
commit
bc15bd663e
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue