summaryrefslogtreecommitdiff
path: root/windowViewPatchset.go
diff options
context:
space:
mode:
Diffstat (limited to 'windowViewPatchset.go')
-rw-r--r--windowViewPatchset.go46
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()
}
}