From 31d2ac1259ed0f7decc677277f06bf565c828ce9 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 5 Mar 2025 03:26:53 -0600 Subject: early working protobuf table update example --- windowHowto.go | 2 +- windowRepos.go | 49 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/windowHowto.go b/windowHowto.go index 71af7c4..a4c7eed 100644 --- a/windowHowto.go +++ b/windowHowto.go @@ -113,5 +113,5 @@ func downloadForge() { } func buildForge() { - log.Info("not done yet") + log.Info("buildForge() not done yet") } diff --git a/windowRepos.go b/windowRepos.go index 4a8913f..0c9283a 100644 --- a/windowRepos.go +++ b/windowRepos.go @@ -97,31 +97,51 @@ func makeReposWin() *gadgets.GenericWindow { grid := insertWin.Group.RawGrid() var t *gitpb.ReposTable - grid.NewButton("insert table", func() { + grid.NewButton("dirty", func() { + if t != nil { + t.Delete() + t = nil + } + found := findDirty() + + // display the protobuf + t = addWindowPB(insertWin, found) + 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() - if me.forge.Config.IsReadOnly(repo.GetGoPath()) { - continue - } - found.AppendByGoPath(repo) } - - // make the window for the first time + // display the protobuf t = addWindowPB(insertWin, found) log.Info("table has uuid", t.GetUuid()) }) - grid.NewButton("attempt to delete table", func() { - t.Delete() - t = nil - }) + 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 + } - grid.NewButton("insert dirty table", func() { - found := findDirty() + found.AppendByGoPath(repo) + + } // make the window for the first time t = addWindowPB(insertWin, found) @@ -221,7 +241,7 @@ func makeReposWin() *gadgets.GenericWindow { }) grid.NewButton("unknown branches", func() { - log.Info("not done yet") + log.Info("unknown branches not done yet") }) grid.NextRow() @@ -244,7 +264,6 @@ func makeReposWin() *gadgets.GenericWindow { } func develBehindMasterProblem() *gitpb.Repos { - log.Info("not done yet") found := new(gitpb.Repos) all := me.forge.Repos.SortByFullPath() for all.Scan() { -- cgit v1.2.3