moved good/bad into the GUI
This commit is contained in:
parent
b60e7aa98b
commit
282215e760
6
doGui.go
6
doGui.go
|
@ -49,9 +49,9 @@ func doGui() {
|
||||||
// this is just interesting to see how fast it is on various boxes
|
// this is just interesting to see how fast it is on various boxes
|
||||||
// and with how many repos you are working with. On my current laptop
|
// and with how many repos you are working with. On my current laptop
|
||||||
// I have 320 repos and when I'm using it and most things are in memory
|
// I have 320 repos and when I'm using it and most things are in memory
|
||||||
// cache, it takes around
|
// cache, it took: rill repos.Reload() took (2ms)
|
||||||
// 13G 424266 total files
|
// which is hard to believe when my ~/go/src is 13G with 424266 files
|
||||||
|
// nevermind, there must be something wrong with the code right now
|
||||||
log.Printf("rill repos.Reload() took (%s)\n", shell.FormatDuration(time.Since(now)))
|
log.Printf("rill repos.Reload() took (%s)\n", shell.FormatDuration(time.Since(now)))
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ func doPatch() error {
|
||||||
func doPatchList() error {
|
func doPatchList() error {
|
||||||
psets, err := openPatchsets()
|
psets, err := openPatchsets()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Info("Get Patchsets failed", err)
|
log.Info("Open Patchsets failed", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
log.Info("got psets len", len(psets.Patchsets))
|
log.Info("got psets len", len(psets.Patchsets))
|
||||||
|
|
|
@ -63,11 +63,6 @@ func (r *patchesWindow) initWindow() {
|
||||||
|
|
||||||
// update the stats about the repos and patches
|
// update the stats about the repos and patches
|
||||||
r.Update()
|
r.Update()
|
||||||
|
|
||||||
g := r.stack.NewGroup("Patchset List")
|
|
||||||
|
|
||||||
// add the grid
|
|
||||||
r.psetgrid = g.RawGrid()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *patchesWindow) submitPatchesBox() {
|
func (r *patchesWindow) submitPatchesBox() {
|
||||||
|
@ -133,15 +128,33 @@ func (r *patchesWindow) submitPatchesBox() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
r.submitB.Disable()
|
r.submitB.Disable()
|
||||||
grid.NextRow()
|
grid.NextRow()
|
||||||
|
|
||||||
|
g := r.stack.NewGroup("Patchset List")
|
||||||
|
// add the grid
|
||||||
|
r.psetgrid = g.RawGrid()
|
||||||
|
|
||||||
|
psets, err := openPatchsets()
|
||||||
|
if err != nil {
|
||||||
|
log.Info("Open Patchsets failed", err)
|
||||||
|
// return err
|
||||||
|
} else {
|
||||||
|
log.Info("got psets len", len(psets.Patchsets))
|
||||||
|
all := psets.SortByName()
|
||||||
|
for all.Scan() {
|
||||||
|
pset := all.Next()
|
||||||
|
// log.Info("pset name =", pset.Name)
|
||||||
|
r.addPatchsetNew(pset)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) {
|
func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) {
|
||||||
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)
|
||||||
|
r.psetgrid.NewLabel(pset.State)
|
||||||
|
|
||||||
var win *patchWindow
|
var win *patchWindow
|
||||||
r.psetgrid.NewButton("View", func() {
|
r.psetgrid.NewButton("View", func() {
|
||||||
|
|
Loading…
Reference in New Issue