From fbaeaacb0a9f3ed3901815e0fa33445b6ba8bc8e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 11 Jan 2024 15:57:08 -0600 Subject: [PATCH] fixed after gui change Signed-off-by: Jeff Carr --- Makefile | 3 ++- main.go | 23 +++++------------------ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index a164762..4a83ab6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ all: echo "build it!" go build -v -x - ./myrepos + # ./myrepos + ./myrepos >/tmp/myrepos.stderr 2>&1 redomod: rm -f go.* diff --git a/main.go b/main.go index 6813a45..a93d951 100644 --- a/main.go +++ b/main.go @@ -68,14 +68,15 @@ func addRepo(grid *gui.Node, path string) *repo { newRepo.scan() if newRepo.status == nil { newRepo.status = repostatus.New(myGui, newRepo.path) - newRepo.status.InitWindow() + newRepo.status.Vertical() + newRepo.status.Horizontal() newRepo.status.Make() newRepo.status.Draw() newRepo.status.Draw2() } newRepo.status.Toggle() }) - newRepo.pButton = grid.NewButton("push", func () { + newRepo.pButton = grid.NewButton("rescan", func () { newRepo.scan() }) if path == "" { @@ -92,7 +93,7 @@ func repoworld() { win := gadgets.NewBasicWindow(myGui, "git autotypist. it types faster than you can.") box := win.Box().NewBox("bw vbox", false) - box2 := win.Box().NewBox("bw vbox", false) + // box2 := win.Box().NewBox("bw vbox", false) group := box.NewGroup("go repositories (read from ~/.config/myrepolist)") grid := group.NewGrid("test", 11, 1) @@ -114,21 +115,7 @@ func repoworld() { addRepo(grid, repo) } - var mystatus *repostatus.RepoStatus - box2.NewButton("repostatus()", func () { - if mystatus == nil { - mystatus = repostatus.New(myGui, "go.wit.com/gui/gui") - mystatus.InitWindow() - mystatus.Make() - mystatus.Draw() - mystatus.Draw2() - } - mystatus.Toggle() - }) - box2.NewButton("hello", func () { - log.Println("world") - hellosmart() - }) + win.Draw() } // This creates a window