early working protobuf table update example

This commit is contained in:
Jeff Carr 2025-03-05 03:26:53 -06:00
parent 7367335143
commit 31d2ac1259
2 changed files with 36 additions and 17 deletions

View File

@ -113,5 +113,5 @@ func downloadForge() {
}
func buildForge() {
log.Info("not done yet")
log.Info("buildForge() not done yet")
}

View File

@ -97,7 +97,40 @@ 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()
found.AppendByGoPath(repo)
}
// display the protobuf
t = addWindowPB(insertWin, found)
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() {
@ -114,19 +147,6 @@ func makeReposWin() *gadgets.GenericWindow {
t = addWindowPB(insertWin, found)
log.Info("table has uuid", t.GetUuid())
})
grid.NewButton("attempt to delete table", func() {
t.Delete()
t = nil
})
grid.NewButton("insert dirty table", func() {
found := findDirty()
// make the window for the first time
t = addWindowPB(insertWin, found)
log.Info("table has uuid", t.GetUuid())
})
})
grid.NewButton("Configure", func() {
@ -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() {