play around with button options
This commit is contained in:
parent
cfeede7012
commit
01f93fe846
|
@ -74,7 +74,31 @@ func globalBuildOptions(vbox *gui.Node) {
|
||||||
me.userHomePwd.SetText(homeDir)
|
me.userHomePwd.SetText(homeDir)
|
||||||
srcDir := filepath.Join(homeDir, "go/src")
|
srcDir := filepath.Join(homeDir, "go/src")
|
||||||
me.goSrcPwd.SetText(srcDir)
|
me.goSrcPwd.SetText(srcDir)
|
||||||
|
grid.NextRow()
|
||||||
|
|
||||||
|
grid.NewGroup("git checkout")
|
||||||
|
// checking this will automatically make the branches off of devel
|
||||||
|
grid.NextRow()
|
||||||
|
me.autoCreateBranches = grid.NewCheckbox("create if missing").SetChecked(true)
|
||||||
|
grid.NextRow()
|
||||||
|
|
||||||
|
grid.NewButton("default", func() {
|
||||||
|
me.repos.View.ArgCheckoutUser()
|
||||||
|
})
|
||||||
|
grid.NewLabel("guimaster,master,main") // set the order of these in the config file
|
||||||
|
grid.NextRow()
|
||||||
|
|
||||||
|
grid.NewButton("devel", func() {
|
||||||
|
me.repos.View.ArgCheckoutDevel()
|
||||||
|
})
|
||||||
|
grid.NewLabel("guidevel,devel")
|
||||||
|
grid.NextRow()
|
||||||
|
|
||||||
|
grid.NewButton("user", func() {
|
||||||
|
me.repos.View.ArgCheckoutUser()
|
||||||
|
})
|
||||||
|
grid.NewLabel(usr.Username)
|
||||||
|
grid.NextRow()
|
||||||
// select the branch you want to test, build and develop against
|
// select the branch you want to test, build and develop against
|
||||||
// this lets you select your user branch, but, when you are happy
|
// this lets you select your user branch, but, when you are happy
|
||||||
// you can merge everything into the devel branch and make sure it actually
|
// you can merge everything into the devel branch and make sure it actually
|
||||||
|
@ -119,14 +143,12 @@ func globalBuildOptions(vbox *gui.Node) {
|
||||||
}
|
}
|
||||||
log.Info("set", count, "branches to", targetName)
|
log.Info("set", count, "branches to", targetName)
|
||||||
})
|
})
|
||||||
me.newBranch = grid.NewCombobox()
|
me.newBranch = grid.NewDropdown()
|
||||||
me.newBranch.AddText("master")
|
me.newBranch.AddText("master")
|
||||||
me.newBranch.AddText("devel")
|
me.newBranch.AddText("devel")
|
||||||
me.newBranch.AddText(usr.Username)
|
me.newBranch.AddText(usr.Username)
|
||||||
me.newBranch.SetText(usr.Username)
|
me.newBranch.SetText(usr.Username)
|
||||||
|
|
||||||
// checking this will automatically make the branches off of devel
|
|
||||||
me.autoCreateBranches = grid.NewCheckbox("create if missing").SetChecked(true)
|
|
||||||
grid.NextRow()
|
grid.NextRow()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,43 @@ func globalResetOptions(box *gui.Node) {
|
||||||
me.stopOnErrors.SetChecked(true)
|
me.stopOnErrors.SetChecked(true)
|
||||||
|
|
||||||
me.autoDryRun = group2.NewCheckbox("autotypist --dry-run")
|
me.autoDryRun = group2.NewCheckbox("autotypist --dry-run")
|
||||||
|
me.autoDryRun.Custom = func() {
|
||||||
|
if me.autoDryRun.Checked() {
|
||||||
|
os.Setenv("REPO_DRYRUN", "on")
|
||||||
|
} else {
|
||||||
|
os.Setenv("REPO_DRYRUN", "off")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
me.autoDryRun.SetChecked(true)
|
me.autoDryRun.SetChecked(true)
|
||||||
|
|
||||||
buildOptions := group2.NewGrid("buildOptions", 2, 1)
|
grid := group2.RawGrid()
|
||||||
|
|
||||||
buildOptions.NewLabel("start over")
|
grid.NewButton("delete user branches", func() {
|
||||||
me.deleteGoSrcPkgB = buildOptions.NewButton("rm ~/go/src & ~/go/pkg", func() {
|
os.Setenv("REPO_FORCE", "off")
|
||||||
|
for _, repo := range repolist.AllRepos() {
|
||||||
|
repo.Status.DeleteUserBranch(false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
grid.NextRow()
|
||||||
|
|
||||||
|
grid.NewButton("delete user branches --force", func() {
|
||||||
|
os.Setenv("REPO_FORCE", "on")
|
||||||
|
for _, repo := range repolist.AllRepos() {
|
||||||
|
repo.Status.DeleteUserBranch(true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
grid.NextRow()
|
||||||
|
|
||||||
|
grid.NewButton("reset all branches", func() {
|
||||||
|
for _, repo := range repolist.AllRepos() {
|
||||||
|
repo.Status.ResetBranches()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
grid.NextRow()
|
||||||
|
|
||||||
|
grid.NewLabel("start over")
|
||||||
|
me.deleteGoSrcPkgB = grid.NewButton("rm ~/go/src & ~/go/pkg", func() {
|
||||||
var state string = me.deleteGoSrcPkgB.String()
|
var state string = me.deleteGoSrcPkgB.String()
|
||||||
for _, repo := range repolist.AllRepos() {
|
for _, repo := range repolist.AllRepos() {
|
||||||
if repo.GoPath() == "go.wit.com/apps/autotypist" {
|
if repo.GoPath() == "go.wit.com/apps/autotypist" {
|
||||||
|
|
1
main.go
1
main.go
|
@ -62,6 +62,5 @@ func main() {
|
||||||
// intermittently scans the status indefinitly
|
// intermittently scans the status indefinitly
|
||||||
me.repos.View.Watchdog(func() {
|
me.repos.View.Watchdog(func() {
|
||||||
log.Info("watchdog in autotypist main()")
|
log.Info("watchdog in autotypist main()")
|
||||||
log.Info("check for devel changes here")
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue