summaryrefslogtreecommitdiff
path: root/doGui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-21 16:10:33 -0600
committerJeff Carr <[email protected]>2025-02-21 16:10:33 -0600
commitce938cc73bbd7849a4fd7de8e24e529fdb7dc8c9 (patch)
tree514abaad9c8040f07c5ecf1f9ffc375e8483ae68 /doGui.go
parentefd0373c2174cb505ec9c5d8b8ca999d8a776728 (diff)
start converting over to using a direct pb grid
Diffstat (limited to 'doGui.go')
-rw-r--r--doGui.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/doGui.go b/doGui.go
index bc84555..8c70cd4 100644
--- a/doGui.go
+++ b/doGui.go
@@ -371,6 +371,29 @@ func drawWindow(win *gadgets.BasicWindow) {
}
// this is the magic that generates a window directly from the protocol buffer
+func makeStandardReposGrid(pb *gitpb.Repos) *gitpb.ReposTable {
+ t := pb.NewTable("testDirty")
+ sf := t.AddStringFunc("repo", func(r *gitpb.Repo) string {
+ return r.GetGoPath()
+ })
+ // 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()
+ })
+ t.AddMasterVersion()
+ t.AddDevelVersion()
+ t.AddUserVersion()
+ t.AddCurrentBranchName()
+ t.AddState()
+ return t
+}
+
+// this is the magic that generates a window directly from the protocol buffer
func makeStandardReposWindow(pb *gitpb.Repos) {
t := pb.NewTable("testDirty")
sf := t.AddStringFunc("repo", func(r *gitpb.Repo) string {