diff options
Diffstat (limited to 'windowNewPatchsets.go')
| -rw-r--r-- | windowNewPatchsets.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/windowNewPatchsets.go b/windowNewPatchsets.go index 96b293f..a32fd4e 100644 --- a/windowNewPatchsets.go +++ b/windowNewPatchsets.go @@ -54,7 +54,38 @@ func makePatchsetsWin() *stdPatchsetTableWin { log.Info("Get Patchsets failed", err) return } + + var foundnew bool + all := psets.All() + for all.Scan() { + pset := all.Next() + found := me.psets.FindByUuid(pset.Uuid) + if found == nil { + log.Info("new patchset", pset.Name, pset.Uuid) + pset.State = "new" + foundnew = true + } else { + log.Info("patchset already on disk", found.Name, found.State) + pset.State = found.State + if pset.State == "" { + pset.State = "new" + } + } + } dwin.doPatchsetsTable(psets) + if foundnew { + log.Info("should save these here") + me.psets = psets + savePatchsets() + } + }) + + grid.NewButton("save", func() { + if me.psets == nil { + log.Info("No Patchsets loaded") + return + } + savePatchsets() }) grid.NewButton("analyse and save patchsets", func() { |
