diff options
| author | Jeff Carr <[email protected]> | 2025-02-21 16:10:33 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-21 16:10:33 -0600 |
| commit | ce938cc73bbd7849a4fd7de8e24e529fdb7dc8c9 (patch) | |
| tree | 514abaad9c8040f07c5ecf1f9ffc375e8483ae68 /doGui.go | |
| parent | efd0373c2174cb505ec9c5d8b8ca999d8a776728 (diff) | |
start converting over to using a direct pb grid
Diffstat (limited to 'doGui.go')
| -rw-r--r-- | doGui.go | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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 { |
