summaryrefslogtreecommitdiff
path: root/subitPatches.go
diff options
context:
space:
mode:
Diffstat (limited to 'subitPatches.go')
-rw-r--r--subitPatches.go98
1 files changed, 54 insertions, 44 deletions
diff --git a/subitPatches.go b/subitPatches.go
index a653bcf..9929909 100644
--- a/subitPatches.go
+++ b/subitPatches.go
@@ -55,45 +55,44 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
group1 := box.NewGroup("Patch Summary")
s.grid = group1.RawGrid()
- s.grid.NewButton("Update Patch Counts", func() {
- /*
- var repocount, patchcount int
- // broken after move to forge protobuf
- all := me.forge.Repos.SortByFullPath()
- for all.Scan() {
- repo := all.Next()
- if repo.GetReadOnly() {
- continue
- }
- i, _ := repo.GetMasterPatches()
- patchcount += i
- if i > 0 {
- repocount += 1
+ /*
+ s.grid.NewButton("Update Patch Counts", func() {
+ var repocount, patchcount int
+ // broken after move to forge protobuf
+ all := me.forge.Repos.SortByFullPath()
+ for all.Scan() {
+ repo := all.Next()
+ if repo.GetReadOnly() {
+ continue
+ }
+ i, _ := repo.GetMasterPatches()
+ patchcount += i
+ if i > 0 {
+ repocount += 1
+ }
}
- }
- s.totalMasterPatches.SetText(strconv.Itoa(patchcount) + " patches")
- s.totalMasterRepos.SetText(strconv.Itoa(repocount) + " go repos")
+ s.totalMasterPatches.SetText(strconv.Itoa(patchcount) + " patches")
+ s.totalMasterRepos.SetText(strconv.Itoa(repocount) + " go repos")
- repocount = 0
- patchcount = 0
- // broken after move to forge protobuf
- all = me.forge.Repos.SortByFullPath()
- for all.Scan() {
- repo := all.Next()
- if repo.GetReadOnly() {
- continue
- }
- i, _ := repo.GetUserPatches()
- patchcount += i
- if i > 0 {
- repocount += 1
+ repocount = 0
+ patchcount = 0
+ // broken after move to forge protobuf
+ all = me.forge.Repos.SortByFullPath()
+ for all.Scan() {
+ repo := all.Next()
+ if repo.GetReadOnly() {
+ continue
+ }
+ i, _ := repo.GetUserPatches()
+ patchcount += i
+ if i > 0 {
+ repocount += 1
+ }
}
- }
- s.totalUserPatches.SetText(strconv.Itoa(patchcount) + " patches")
- s.totalUserRepos.SetText(strconv.Itoa(repocount) + " go repos")
- */
- s.Update()
- })
+ s.totalUserPatches.SetText(strconv.Itoa(patchcount) + " patches")
+ s.totalUserRepos.SetText(strconv.Itoa(repocount) + " go repos")
+ })
+ */
/* this used to be the way and should probably be revisited
s.grid.NewButton("Make Patches", func() {
@@ -138,14 +137,16 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
s.totalMasterPatches = s.grid.NewLabel("x patches")
s.grid.NextRow()
- s.grid.NewLabel("")
- s.grid.NewLabel("")
- s.grid.NewButton("merge from user", func() {
- log.Info("this should make a patchset of your patches")
- })
- s.grid.NewButton("merge from devel", func() {
- log.Info("this probably should not exist")
- })
+ /*
+ s.grid.NewLabel("")
+ s.grid.NewLabel("")
+ s.grid.NewButton("merge from user", func() {
+ log.Info("this should make a patchset of your patches")
+ })
+ s.grid.NewButton("merge from devel", func() {
+ log.Info("this probably should not exist")
+ })
+ */
s.grid.NextRow()
group1 = box.NewGroup("Submit Patch Set")
@@ -172,6 +173,15 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
}
me.repos.View.MakePatchset(patchdir)
})
+ s.grid.NewButton("Show Repos", func() {
+ s.Update()
+ if me.repos.Hidden() {
+ me.repos.Show()
+ } else {
+ me.repos.Hide()
+ }
+ })
+
/*
s.submitB = s.grid.NewButton("Submit quilt", func() {
log.Info("do a submit here")