diff options
Diffstat (limited to 'doGui.go')
| -rw-r--r-- | doGui.go | 40 |
1 files changed, 27 insertions, 13 deletions
@@ -193,19 +193,6 @@ func drawWindow(win *gadgets.GenericWindow) { releaseWin = makeModeMasterWin() }) - /* - // the Devel / Patch mode window - var patchWin *patchesWindow - gridM.NewButton("Patch Window", func() { - if patchWin != nil { - patchWin.Toggle() - return - } - patchWin = new(patchesWindow) - patchWin.initWindow() - patchWin.Show() - }) - */ var patches *stdPatchsetTableWin gridM.NewButton("Patch Window", func() { if patches != nil { @@ -234,6 +221,33 @@ func drawWindow(win *gadgets.GenericWindow) { reposWin = makeReposWin() }) + var patchesWin *stdPatchTableWin + gridM.NewButton("Pending patches", func() { + if patchesWin != nil { + patchesWin.Toggle() + return + } + loadUpstreamPatchsets() + if me.psets == nil { + log.Info("failed to download current patchsets") + return + } + notdone := new(forgepb.Patches) + + all := me.psets.All() + for all.Scan() { + pset := all.Next() + AddNotDonePatches(notdone, pset) + } + + for patch := range notdone.IterAll() { + comment := cleanSubject(patch.Comment) + log.Info("new patch:", patch.NewHash, "commithash:", patch.CommitHash, patch.RepoNamespace, comment) + } + // savePatchsets() + patchesWin = makePatchesWin(notdone) + }) + // set the initial button state based on the last // forge mode the user saved in the config file switch me.forge.Config.Mode { |
