diff options
| author | Jeff Carr <[email protected]> | 2024-01-14 01:59:19 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-14 01:59:19 -0600 |
| commit | c22d0f48664d9ea5d89a64a32dcac1db956efc67 (patch) | |
| tree | cba9415245cc100f79e25ec46b8fd19cdebadfef /main.go | |
| parent | 595f4c6eb37b98afc155662904df9806308f5914 (diff) | |
grid.Margin() works
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 25 |
1 files changed, 20 insertions, 5 deletions
@@ -49,8 +49,8 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri log.Warn("status window doesn't exist") return } - log.Warn("status window exists. trying Update() here") - newRepo.status.Toggle() + log.Warn("status window exists. trying Show() here") + newRepo.status.Show() }) grid.NewButton("TestDraw()", func () { if newRepo.status == nil { @@ -65,9 +65,6 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri newRepo.pButton.Hide() } newRepo.status = repostatus.New(myGui, newRepo.path) - newRepo.status.Horizontal() - newRepo.status.Make() - newRepo.status.Make2() newRepo.status.SetMasterName(master) newRepo.status.SetDevelName(devel) newRepo.status.SetUserName(user) @@ -84,6 +81,7 @@ func repoworld() { // box2 := win.Box().NewBox("bw vbox", false) group := box.NewGroup("go repositories (read from ~/.config/myrepolist)") grid := group.NewGrid("test", 11, 1) + grid.Margin() grid.NewLabel("") grid.NewLabel("branch") @@ -109,5 +107,22 @@ func repoworld() { addRepo(grid, path, mbranch, dbranch, ubranch) } + box2 := win.Box().NewBox("bw vbox", false) + box2.NewButton("grid.Pad()", func () { + grid.Margin() + }) + + box2.NewButton("status.Update() all", func () { + for _, repo := range allrepos { + repo.status.Update() + } + }) + + box2.NewButton("rescan all", func () { + for _, repo := range allrepos { + repo.newScan() + } + }) + win.Draw() } |
