cleanup noise

This commit is contained in:
Jeff Carr 2025-03-10 09:44:23 -05:00
parent 62b8c685f0
commit 0baeaa5525
1 changed files with 35 additions and 5 deletions

View File

@ -39,13 +39,27 @@ func makePatchsetsWin() *stdPatchsetTableWin {
} }
grid := dwin.win.Group.RawGrid() grid := dwin.win.Group.RawGrid()
grid.NewButton("update patchsets", func() { grid.NewButton("reload current patches", func() {
psets, err := me.forge.GetPatchesets()
if err != nil {
log.Info("Get Patchsets failed", err)
return
}
savePatchsets(psets)
dwin.doPatchsetsTable(psets)
})
grid.NewButton("analyse patchsets", func() {
psets, err := openPatchsets() psets, err := openPatchsets()
if err != nil { if err != nil {
log.Info("Open Patchsets failed", err) log.Info("Open Patchsets failed", err)
return return
} }
dwin.doPatchsetsTable(psets) all := psets.All()
for all.Scan() {
pset := all.Next()
log.Info("What is up with?", pset.Name)
}
}) })
// make a box at the bottom of the window for the protobuf table // make a box at the bottom of the window for the protobuf table
@ -86,14 +100,30 @@ func AddPatchsetsPB(tbox *gui.Node, pb *forgepb.Patchsets) *forgepb.PatchsetsTab
t.NewUuid() t.NewUuid()
t.SetParent(tbox) t.SetParent(tbox)
butf := func(p *forgepb.Patchset) string { testf := func(p *forgepb.Patchset) string {
/*
ctime := p.Ctime.AsTime() ctime := p.Ctime.AsTime()
s := ctime.Format("2006/01/02 15:04") s := ctime.Format("2006/01/02 15:04")
log.Info("Found", s, p.Name) log.Info("test button", s, p.Name)
*/
return "test"
}
t.AddButtonFunc("test", testf)
butf := func(p *forgepb.Patchset) string {
/*
ctime := p.Ctime.AsTime()
s := ctime.Format("2006/01/02 15:04")
log.Info("view button", s, p.Name)
*/
return "view" return "view"
} }
t.AddButtonFunc("view", butf) t.AddButtonFunc("view", butf)
t.AddStringFunc("#", func(p *forgepb.Patchset) string {
return fmt.Sprintf("%d", p.Patches.Len())
})
t.AddName() t.AddName()
t.AddComment() t.AddComment()