diff options
Diffstat (limited to 'windowRepos.go')
| -rw-r--r-- | windowRepos.go | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/windowRepos.go b/windowRepos.go index 6782a21..f643164 100644 --- a/windowRepos.go +++ b/windowRepos.go @@ -223,7 +223,7 @@ func makeReposWin() *stdReposTableWin { hbox.NewButton("test", func() { }) - t := makeStandardReposGrid(found) + t := makeDevelBehindMaster(found) t.SetParent(box) t.ShowTable() }) @@ -301,6 +301,25 @@ func makeReposWin() *stdReposTableWin { return rwin } +// table of devel errors behind master +func makeDevelBehindMaster(pb *gitpb.Repos) *gitpb.ReposTable { + t := pb.NewTable("testDirty") + t.NewUuid() + sf := t.AddStringFunc("repo", func(r *gitpb.Repo) string { + return r.GetGoPath() + }) + sf.Custom = func(r *gitpb.Repo) { + log.Info("merge master into devel here", r.GetGoPath()) + } + t.AddTimeFunc("age", func(repo *gitpb.Repo) time.Time { + return repo.NewestTime() + }) + t.AddMasterVersion() + t.AddDevelVersion() + t.AddState() + return t +} + // default window for active running droplets func (rwin *stdReposTableWin) doReposTable(pb *gitpb.Repos) { rwin.Lock() @@ -573,3 +592,24 @@ func addWindowPB(win *gadgets.GenericWindow, pb *gitpb.Repos) *gitpb.ReposTable t.ShowTable() return t } + +func makeReposWindowNew() *gadgets.GenericWindow { + win := gadgets.NewGenericWindow("git repos", "Filter") + win.Custom = func() { + // sets the hidden flag to false so Toggle() works + win.Hide() + } + + hbox := win.Group.Box().Horizontal() + hbox.NewCheckbox("broken") + hbox.NewCheckbox("dirty") + hbox.NewCheckbox("mine") + hbox.NewButton("fix all", func() { + log.Info("try to fix everything here") + }) + + t := makeStandardReposGrid(me.forge.Repos) + t.SetParent(win.Bottom) + t.ShowTable() + return win +} |
