better Patchsets view
This commit is contained in:
parent
0baeaa5525
commit
2c5841f5ec
|
@ -100,31 +100,26 @@ func AddPatchsetsPB(tbox *gui.Node, pb *forgepb.Patchsets) *forgepb.PatchsetsTab
|
|||
t.NewUuid()
|
||||
t.SetParent(tbox)
|
||||
|
||||
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"
|
||||
}
|
||||
t.AddButtonFunc("view", butf)
|
||||
|
||||
t.AddStringFunc("#", func(p *forgepb.Patchset) string {
|
||||
return fmt.Sprintf("%d", p.Patches.Len())
|
||||
})
|
||||
|
||||
t.AddName()
|
||||
testf := func(p *forgepb.Patchset) string {
|
||||
return "test"
|
||||
}
|
||||
tp := t.AddButtonFunc("Analyse", testf)
|
||||
tp.Custom = func(p *forgepb.Patchset) {
|
||||
log.Info("test patchset here", p.Name)
|
||||
}
|
||||
|
||||
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.AddComment()
|
||||
|
||||
ctimef := func(p *forgepb.Patchset) string {
|
||||
|
|
Loading…
Reference in New Issue