fixed after gui change

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-11 15:57:08 -06:00
parent 0d23f7271a
commit fbaeaacb0a
2 changed files with 7 additions and 19 deletions

View File

@ -1,7 +1,8 @@
all: all:
echo "build it!" echo "build it!"
go build -v -x go build -v -x
./myrepos # ./myrepos
./myrepos >/tmp/myrepos.stderr 2>&1
redomod: redomod:
rm -f go.* rm -f go.*

23
main.go
View File

@ -68,14 +68,15 @@ func addRepo(grid *gui.Node, path string) *repo {
newRepo.scan() newRepo.scan()
if newRepo.status == nil { if newRepo.status == nil {
newRepo.status = repostatus.New(myGui, newRepo.path) newRepo.status = repostatus.New(myGui, newRepo.path)
newRepo.status.InitWindow() newRepo.status.Vertical()
newRepo.status.Horizontal()
newRepo.status.Make() newRepo.status.Make()
newRepo.status.Draw() newRepo.status.Draw()
newRepo.status.Draw2() newRepo.status.Draw2()
} }
newRepo.status.Toggle() newRepo.status.Toggle()
}) })
newRepo.pButton = grid.NewButton("push", func () { newRepo.pButton = grid.NewButton("rescan", func () {
newRepo.scan() newRepo.scan()
}) })
if path == "" { if path == "" {
@ -92,7 +93,7 @@ func repoworld() {
win := gadgets.NewBasicWindow(myGui, "git autotypist. it types faster than you can.") win := gadgets.NewBasicWindow(myGui, "git autotypist. it types faster than you can.")
box := win.Box().NewBox("bw vbox", false) 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)") group := box.NewGroup("go repositories (read from ~/.config/myrepolist)")
grid := group.NewGrid("test", 11, 1) grid := group.NewGrid("test", 11, 1)
@ -114,21 +115,7 @@ func repoworld() {
addRepo(grid, repo) addRepo(grid, repo)
} }
var mystatus *repostatus.RepoStatus win.Draw()
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()
})
} }
// This creates a window // This creates a window