diff options
| author | Jeff Carr <[email protected]> | 2025-01-30 09:38:28 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-30 09:38:28 -0600 |
| commit | 80df33888ab4e9b0f7d7b56f45d1bd22b253da3a (patch) | |
| tree | 81b928a0acc6844379ede344f001483cbaeee68f /windowViewPatchset.go | |
| parent | 7779d0185462c94e3330b79ae05ff3996992fb4f (diff) | |
done on this part of the GUI for now I think
Diffstat (limited to 'windowViewPatchset.go')
| -rw-r--r-- | windowViewPatchset.go | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/windowViewPatchset.go b/windowViewPatchset.go index 24f17c7..52758de 100644 --- a/windowViewPatchset.go +++ b/windowViewPatchset.go @@ -12,14 +12,14 @@ import ( ) type patchWindow 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 - pset *forgepb.Patchset // the patchset in question + 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 + pset *forgepb.Patchset // the patchset in question } // todo: autogenerate these or make them standared 'gui' package functions @@ -75,17 +75,26 @@ func makePatchWindow(pset *forgepb.Patchset) *patchWindow { grid := pw.stack.NewGrid("", 0, 0) + grid.NewLabel("Patchset Details:") grid.NewLabel(pset.GitAuthorName) grid.NewLabel(pset.GitAuthorEmail) - grid.NextRow() grid.NewLabel("start branch: " + pset.StartBranchName) grid.NewLabel(pset.StartBranchHash) - grid.NextRow() grid.NewLabel("end branch: " + pset.EndBranchName) grid.NewLabel(pset.EndBranchHash) grid.NextRow() - grid.NewButton("Extract files to disk", func() { + g := pw.stack.NewGroup("PatchSet List") + + // make a grid to put the list of git repos that have patches + // in this particular patchset + grid = g.NewGrid("", 0, 0) + grid.NewLabel("repo") + grid.NewLabel("patch name") + grid.NewLabel("Applied in current branch?") + grid.NewLabel("start hash") + grid.NewLabel("") + grid.NewButton("Extract", func() { if err := savePatchset(pset); err != nil { log.Info("Save err:", err) return @@ -105,19 +114,10 @@ func makePatchWindow(pset *forgepb.Patchset) *patchWindow { applyPatchset(pset) } }) - - g := pw.stack.NewGroup("PatchSet List") - - // make a grid and a header - filegrid := g.NewGrid("", 0, 0) - filegrid.NewLabel("repo") - filegrid.NewLabel("patch name") - filegrid.NewLabel("Applied in current branch?") - filegrid.NewLabel("start hash") - filegrid.NextRow() + grid.NextRow() // add the patches to the grid - pw.addPatchset(filegrid, pset) + pw.addPatchset(grid, pset) return pw } @@ -164,6 +164,8 @@ func (r *patchWindow) addPatchset(grid *gui.Node, pset *forgepb.Patchset) { win = makeRepoPatchWindow(repo, patches) win.Show() }) + grid.NewCheckbox("").SetChecked(true) + grid.NewCheckbox("").SetChecked(true) grid.NextRow() } } |
