kinda runs again

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-17 20:52:07 -06:00
parent b10cb1e3f9
commit a2c47263e3
2 changed files with 11 additions and 3 deletions

View File

@ -60,6 +60,9 @@ func globalDisplayOptions(box *gui.Node) {
repo.newScan() repo.newScan()
} }
}) })
groupvbox.NewButton("repoworld()", func () {
repoworld()
})
} }
func hidePerfect() { func hidePerfect() {

11
main.go
View File

@ -18,12 +18,13 @@ var resToolkit embed.FS
func main() { func main() {
myGui = gui.New() myGui = gui.New()
myGui.InitEmbed(resToolkit) myGui.InitEmbed(resToolkit)
myGui.LoadToolkit("nocui")
myGui.Default() myGui.Default()
autotypistWindow() autotypistWindow()
// repoworld() // repoworld()
log.Sleep(.3) log.Sleep(.3)
hidePerfect() // hidePerfect()
gui.Watchdog() gui.Watchdog()
} }
@ -74,12 +75,16 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
} }
func autotypistWindow() { func autotypistWindow() {
/*
me.autotypistWindow = gadgets.NewBasicWindow(myGui, "autotypist for GO & git. it types faster than you can.") me.autotypistWindow = gadgets.NewBasicWindow(myGui, "autotypist for GO & git. it types faster than you can.")
me.autotypistWindow.Make() me.autotypistWindow.Make()
me.autotypistWindow.StandardExit() me.autotypistWindow.StandardExit()
me.autotypistWindow.Draw()
box := me.autotypistWindow.Box() box := me.autotypistWindow.Box()
me.autotypistWindow.Draw()
*/
win := myGui.NewWindow("autotypist for GO & git. it types faster than you can.")
box := win.NewBox("bw hbox", true)
globalDisplayOptions(box) globalDisplayOptions(box)
globalBuildOptions(box) globalBuildOptions(box)
globalResetOptions(box) globalResetOptions(box)
@ -90,7 +95,6 @@ func autotypistWindow() {
func repoworld() { func repoworld() {
reposwin = gadgets.NewBasicWindow(myGui, "All git repositories in ~/go/src/") reposwin = gadgets.NewBasicWindow(myGui, "All git repositories in ~/go/src/")
reposwin.Make() reposwin.Make()
// reposwin.StandardExit()
reposbox = reposwin.Box().NewBox("bw vbox", false) reposbox = reposwin.Box().NewBox("bw vbox", false)
reposgroup = reposbox.NewGroup("go repositories (read from ~/.config/myrepolist)") reposgroup = reposbox.NewGroup("go repositories (read from ~/.config/myrepolist)")
@ -118,4 +122,5 @@ func repoworld() {
if ubranch == "" { ubranch = usr.Username } if ubranch == "" { ubranch = usr.Username }
addRepo(reposgrid, path, mbranch, dbranch, ubranch) addRepo(reposgrid, path, mbranch, dbranch, ubranch)
} }
reposwin.Draw()
} }