diff options
Diffstat (limited to 'windowRepoProblems.go')
| -rw-r--r-- | windowRepoProblems.go | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/windowRepoProblems.go b/windowRepoProblems.go index b406f11..b60125c 100644 --- a/windowRepoProblems.go +++ b/windowRepoProblems.go @@ -6,7 +6,6 @@ package main import ( "fmt" "sync" - "time" "go.wit.com/lib/gadgets" "go.wit.com/lib/protobuf/forgepb" @@ -86,46 +85,54 @@ func makeRepoProblemsWindow() *repoProblemsWindow { found = develBehindMasterProblem() txt = fmt.Sprintf("devel is behind master (%d)", found.Len()) grid.NewButton(txt, func() { - found := develBehindMasterProblem() - win := gadgets.RawBasicWindow("pbgrid in window") + win := gadgets.RawBasicWindow("devel branches that are out of sync with master") win.Make() win.Show() - box := win.Box().NewBox("bw vbox", false) - win.Custom = func() { // sets the hidden flag to false so Toggle() works win.Hide() } + box := win.Box().NewBox("bw vbox", false) - t := found.NewTable("testDirty") - t.SetParent(box) - sf := t.AddStringFunc("repo", func(r *gitpb.Repo) string { - return r.GetGoPath() + found := develBehindMasterProblem() + group := box.NewGroup("test buttons") + group.NewButton("hello", func() { + log.Info("world") }) - // t.Custom = func() { - // log.Info("close grid?") - // } - sf.Custom = func(r *gitpb.Repo) { - log.Info("do button click on", r.GetGoPath()) - } - t.AddTimeFunc("age", func(repo *gitpb.Repo) time.Time { - return repo.NewestTime() + group.NewButton("list", func() { + log.Info("world") }) - t.AddMasterVersion() - t.AddDevelVersion() - t.AddUserVersion() - t.AddCurrentBranchName() - t.AddState() - t.ShowTable() - // makeStandardReposWindow(found, box) + t := makeStandardReposGrid(found) + t.SetParent(box) + t.ShowTable() }) found = remoteUserBranchProblem() txt = fmt.Sprintf("user branch is remote (%d)", found.Len()) grid.NewButton(txt, func() { + win := gadgets.RawBasicWindow("repos that seem to have remote user branches") + win.Make() + win.Show() + win.Custom = func() { + // sets the hidden flag to false so Toggle() works + win.Hide() + } + box := win.Box().NewBox("bw vbox", false) + found := remoteUserBranchProblem() - makeStandardReposWindow(found) + group := box.NewGroup("test buttons") + group.NewButton("git branch delete", func() { + all := found.SortByFullPath() + for all.Scan() { + repo := all.Next() + log.Info("git branch -D jcarr", repo.GetGoPath()) + } + }) + + t := makeStandardReposGrid(found) + t.SetParent(box) + t.ShowTable() }) grid.NewButton("unknown branches", func() { |
