From 965d6cb6a9895629b900977c9e8f18cc3efa7628 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 30 Jan 2025 09:04:45 -0600 Subject: [PATCH] more hammering --- windowPatches.go | 65 ++++++++++++++++-------------------------------- 1 file changed, 22 insertions(+), 43 deletions(-) diff --git a/windowPatches.go b/windowPatches.go index b347e05..71977a7 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -13,15 +13,28 @@ import ( ) type patchesWindow struct { - once sync.Once // only init() the window once - win *gadgets.BasicWindow // the patches window - stack *gui.Node // the top box set as vertical - shelf *gui.Node // the first box in the stack, set as horizontal - grid *gui.Node // the list of available patches - summary *patchSummary // summary of current patches - setgrid *gui.Node // the list of each patchset - // setlist map[string]*forgepb.Patchset // a map of the patch names to the protobuf - // setwin map[string]*patchWindow // a map of the patch names to the protobuf + once sync.Once // only init() the window once + win *gadgets.BasicWindow // the patches window + stack *gui.Node // the top box set as vertical + // shelf *gui.Node // the first box in the stack, set as horizontal + grid *gui.Node // the list of available patches + summary *patchSummary // summary of current patches + setgrid *gui.Node // the list of each patchset +} + +type patchSummary struct { + grid *gui.Node + // updateB *gui.Node + // docsB *gui.Node + // gitPushB *gui.Node + // gitPullB *gui.Node + checkB *gui.Node + totalOL *gadgets.OneLiner + dirtyOL *gadgets.OneLiner + readonlyOL *gadgets.OneLiner + rw *gadgets.OneLiner + reason *gadgets.BasicEntry + submitB *gui.Node } func (r *patchesWindow) Hidden() bool { @@ -67,14 +80,6 @@ func (r *patchesWindow) initWindow() { } r.grid = r.stack.NewGrid("", 0, 0) - - /* - r.shelf = r.initGroup() - group1 := r.stack.NewGroup("stuff") - vbox := group1.Box() - vbox.Vertical() - */ - r.summary = r.submitPatchesBox(r.stack) // update the stats about the repos and patches @@ -86,32 +91,6 @@ func (r *patchesWindow) initWindow() { r.setgrid = g.NewGrid("", 0, 0) } -type patchSummary struct { - grid *gui.Node - updateB *gui.Node - docsB *gui.Node - gitPushB *gui.Node - gitPullB *gui.Node - checkB *gui.Node - totalOL *gadgets.OneLiner - dirtyOL *gadgets.OneLiner - readonlyOL *gadgets.OneLiner - rw *gadgets.OneLiner - // totalPatchesOL *gadgets.OneLiner - // totalUserRepos *gui.Node - // totalDevelRepos *gui.Node - // totalMasterRepos *gui.Node - // totalUserPatches *gui.Node - // totalDevelPatches *gui.Node - // totalMasterPatches *gui.Node - // fileCount *gui.Node - // unknownOL *gadgets.BasicEntry - // unknownSubmitB *gui.Node - reason *gadgets.BasicEntry - submitB *gui.Node - // allp []*repolist.Patch -} - func (r *patchesWindow) submitPatchesBox(box *gui.Node) *patchSummary { s := new(patchSummary) group1 := box.NewGroup("Repo Summary")