From efd0373c2174cb505ec9c5d8b8ca999d8a776728 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 21 Feb 2025 15:37:28 -0600 Subject: [PATCH] attempt to switch table to just a grid --- windowRepoProblems.go | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/windowRepoProblems.go b/windowRepoProblems.go index e04766c..b406f11 100644 --- a/windowRepoProblems.go +++ b/windowRepoProblems.go @@ -6,6 +6,7 @@ package main import ( "fmt" "sync" + "time" "go.wit.com/lib/gadgets" "go.wit.com/lib/protobuf/forgepb" @@ -69,6 +70,7 @@ func makeRepoProblemsWindow() *repoProblemsWindow { // sync.Once() pw.win = gadgets.RawBasicWindow("Potential Repo Problems") pw.win.Make() + pw.win.Show() pw.stack = pw.win.Box().NewBox("bw vbox", false) pw.win.Custom = func() { @@ -85,7 +87,38 @@ func makeRepoProblemsWindow() *repoProblemsWindow { txt = fmt.Sprintf("devel is behind master (%d)", found.Len()) grid.NewButton(txt, func() { found := develBehindMasterProblem() - makeStandardReposWindow(found) + win := gadgets.RawBasicWindow("pbgrid in window") + win.Make() + win.Show() + box := win.Box().NewBox("bw vbox", false) + + win.Custom = func() { + // sets the hidden flag to false so Toggle() works + win.Hide() + } + + t := found.NewTable("testDirty") + t.SetParent(box) + 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() + t.ShowTable() + + // makeStandardReposWindow(found, box) }) found = remoteUserBranchProblem()