diff options
| author | Jeff Carr <[email protected]> | 2025-05-31 14:38:55 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-05-31 14:38:55 -0500 |
| commit | 9f367cb39b6f6275b0f88fc4fc038cdec33334fa (patch) | |
| tree | 1d6ae341f67905ec304c11a2dc7d26a9bfd6ab1e /windowReposFix.go | |
| parent | 2f8da5a8be17c161c107cff96adabe178c977500 (diff) | |
drop old code. rearrange buttons
Diffstat (limited to 'windowReposFix.go')
| -rw-r--r-- | windowReposFix.go | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/windowReposFix.go b/windowReposFix.go index e6d2795..22c00ef 100644 --- a/windowReposFix.go +++ b/windowReposFix.go @@ -22,124 +22,6 @@ func makeReposWin() *stdReposTableWin { rwin.win = win grid := win.Group.RawGrid() - me.repoDirtyB = grid.NewButton("dirty", func() { - doCheckDirtyAndConfigSave() - found := findDirty() - tb, box := makeStandardReposWindow("dirty repos", found) - hbox := box.Box().Horizontal() - hbox.NewButton("commit all", func() { - for repo := range found.IterByFullPath() { - log.Info("do commit here on", repo.GetGoPath()) - } - log.Info("TODO: fix this") - log.Info("run 'forge commit --all'") - }) - hbox.NewButton("update table", func() { - me.forge.PrintHumanTable(found) - found2 := findDirty() - me.forge.PrintHumanTable(found2) - // tb.Update() - // tb.UpdateTable(found2) - }) - hbox.NewButton("delete table", func() { - tb.Delete() - }) - }) - - me.repoAllB = grid.NewButton("All", func() { - me.found = new(gitpb.Repos) - all := me.forge.Repos.SortByFullPath() - for all.Scan() { - repo := all.Next() - me.found.AppendByGoPath(repo) - - } - makeStandardReposWindow("All repos", me.found) - }) - - var insertWin *gadgets.GenericWindow - me.repoWritableB = grid.NewButton("insert test", func() { - // if the window exists, just toggle it open or closed - if insertWin != nil { - insertWin.Toggle() - return - } - - insertWin = makeWindowForPB() - insertWin.Win.Custom = func() { - log.Info("test delete window here") - } - grid := insertWin.Group.RawGrid() - - var t *gitpb.ReposTable - grid.NewButton("dirty", func() { - if t != nil { - t.Delete() - t = nil - } - found := findDirty() - - // display the protobuf - t = addWindowPB(insertWin, found) - f := func(repo *gitpb.Repo) { - log.Info("got to ReposTable.Custom() id =", repo.GetGoPath(), repo.GetCurrentVersion()) - } - t.Custom(f) - log.Info("table has uuid", t.GetUuid()) - }) - - grid.NewButton("all", func() { - if t != nil { - t.Delete() - t = nil - } - found := new(gitpb.Repos) - all := me.forge.Repos.SortByFullPath() - for all.Scan() { - repo := all.Next() - found.AppendByGoPath(repo) - - } - // display the protobuf - t = addWindowPB(insertWin, found) - f := func(repo *gitpb.Repo) { - log.Info("got to ReposTable.Custom() id =", repo.GetGoPath(), repo.GetCurrentVersion()) - } - t.Custom(f) - log.Info("table has uuid", t.GetUuid()) - }) - - grid.NewButton("writeable", func() { - if t != nil { - t.Delete() - t = nil - } - found := new(gitpb.Repos) - all := me.forge.Repos.SortByFullPath() - for all.Scan() { - repo := all.Next() - if me.forge.Config.IsReadOnly(repo.GetGoPath()) { - continue - } - - found.AppendByGoPath(repo) - - } - - // make the window for the first time - t = addWindowPB(insertWin, found) - f := func(repo *gitpb.Repo) { - log.Info("got to ReposTable.Custom() id =", repo.GetGoPath(), repo.GetCurrentVersion()) - } - t.Custom(f) - log.Info("table has uuid", t.GetUuid()) - }) - }) - - grid.NewButton("Configure", func() { - log.Info("add a forge config window here") - }) - win.Top.NewGroup("misc (works in progress)") grid = win.Top.RawGrid() @@ -513,12 +395,6 @@ func makeWritableWindow(pb *gitpb.Repos) (*gadgets.GenericWindow, *gitpb.ReposTa return win, t } -func makeWindowForPB() *gadgets.GenericWindow { - win := gadgets.NewGenericWindow("Raw PB View", "Configure") - - return win -} - func addWindowPB(win *gadgets.GenericWindow, pb *gitpb.Repos) *gitpb.ReposTable { t := pb.NewTable("testForgeRepos") t.NewUuid() |
