package main import ( "go.wit.com/gui" "go.wit.com/lib/debugger" "go.wit.com/lib/gui/logsettings" "go.wit.com/log" ) func globalDisplayOptions(box *gui.Node) { vbox := box.NewVerticalBox("DISPLAYVBOX") group1 := vbox.NewGroup("Global Display Options") hidegrid := group1.NewGrid("hidecfg", 0, 0) hidegrid.NewButton("Show Repository Window", func() { if me.repos.Hidden() { me.repos.Show() } else { me.repos.Hide() } log.Info("showing reposwin") }) hidegrid.NextRow() group1 = vbox.NewGroup("prep for release") grid := group1.RawGrid() grid.NewButton("make prepare-release", func() { me.Disable() me.release.box.Disable() defer me.Enable() loop := me.repos.View.ReposSortByName() for loop.Scan() { repo := loop.Repo() master := repo.Status.GetMasterVersion() lastTag := repo.Status.LastTag() if master == lastTag { repo.Status.SetTargetVersion(master) } else { repo.Status.IncrementRevisionVersion("Nov 2024 test") } } findNext() if setAllBranchesToMaster() { // if it succeeds, disable this button me.setBranchesToMasterB.Disable() me.release.box.Enable() me.repos.View.PrintReleaseReport("", "") } else { log.Info("setAllBranchesToMaster() failed") } }) grid.NextRow() grid.NewButton("logging Window", func() { logsettings.LogWindow() }) grid.NextRow() grid.NewButton("Debugger Window", func() { debugger.DebugWindow() }) }