diff options
| -rw-r--r-- | windowNewPatchsets.go | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/windowNewPatchsets.go b/windowNewPatchsets.go index 484fa2f..d5b2e79 100644 --- a/windowNewPatchsets.go +++ b/windowNewPatchsets.go @@ -100,31 +100,26 @@ func AddPatchsetsPB(tbox *gui.Node, pb *forgepb.Patchsets) *forgepb.PatchsetsTab t.NewUuid() t.SetParent(tbox) + t.AddStringFunc("#", func(p *forgepb.Patchset) string { + return fmt.Sprintf("%d", p.Patches.Len()) + }) + testf := func(p *forgepb.Patchset) string { - /* - ctime := p.Ctime.AsTime() - s := ctime.Format("2006/01/02 15:04") - 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" + tp := t.AddButtonFunc("Analyse", testf) + tp.Custom = func(p *forgepb.Patchset) { + log.Info("test patchset here", p.Name) } - t.AddButtonFunc("view", butf) - t.AddStringFunc("#", func(p *forgepb.Patchset) string { - return fmt.Sprintf("%d", p.Patches.Len()) + vp := t.AddButtonFunc("View Patchset", func(p *forgepb.Patchset) string { + return p.Name }) + vp.Custom = func(pset *forgepb.Patchset) { + win := makePatchWindow(pset) + win.Show() + } - t.AddName() t.AddComment() ctimef := func(p *forgepb.Patchset) string { |
