cleaning stuff

This commit is contained in:
Jeff Carr 2025-02-08 18:44:29 -06:00
parent 1dd4a2d979
commit d7d2e0ba1b
1 changed files with 11 additions and 11 deletions

View File

@ -166,6 +166,17 @@ func (r *patchesWindow) submitPatchesBox() {
} }
func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) { func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) {
var win *patchWindow
r.psetgrid.NewButton("View", func() {
// has the window already been created?
if win != nil {
win.Toggle()
return
}
win = makePatchWindow(pset)
win.Show()
})
r.psetgrid.NewLabel(pset.Name) r.psetgrid.NewLabel(pset.Name)
r.psetgrid.NewLabel(pset.Comment) r.psetgrid.NewLabel(pset.Comment)
r.psetgrid.NewLabel(pset.GitAuthorName) r.psetgrid.NewLabel(pset.GitAuthorName)
@ -180,17 +191,6 @@ func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) {
r.psetgrid.NewLabel("Good") r.psetgrid.NewLabel("Good")
} }
var win *patchWindow
r.psetgrid.NewButton("View", func() {
// has the window already been created?
if win != nil {
win.Toggle()
return
}
win = makePatchWindow(pset)
win.Show()
})
r.psetgrid.NextRow() r.psetgrid.NextRow()
} }