better names. think about 'Menu's
This commit is contained in:
parent
a182d6b423
commit
0c7846d76a
3
Makefile
3
Makefile
|
@ -12,6 +12,9 @@ build:
|
|||
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
|
||||
GO111MODULE=off go build -v -x
|
||||
|
||||
vet:
|
||||
GO111MODULE=off go vet
|
||||
|
||||
only-me: build
|
||||
reset
|
||||
./autotypist --only-me
|
||||
|
|
|
@ -36,7 +36,7 @@ func globalBuildOptions(vbox *gui.Node) {
|
|||
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)
|
||||
me.autoCreateBranches = grid.NewCheckbox("auto-create branches if not upstream").SetChecked(true)
|
||||
me.autoCreateBranches.Custom = func() {
|
||||
if me.autoCreateBranches.Checked() {
|
||||
os.Setenv("AUTOTYPIST_CREATE_BRANCHES", "on")
|
||||
|
@ -49,13 +49,13 @@ func globalBuildOptions(vbox *gui.Node) {
|
|||
grid.NewButton("git checkout default", func() {
|
||||
me.repos.View.ArgCheckoutMaster()
|
||||
})
|
||||
grid.NewLabel("master,main,etc.") // set the order of these in the config file
|
||||
grid.NewLabel("master,main,etc.") // set the order of these in the config file ?
|
||||
grid.NextRow()
|
||||
|
||||
grid.NewButton("git checkout devel", func() {
|
||||
me.repos.View.ArgCheckoutDevel()
|
||||
})
|
||||
grid.NewLabel("guidevel,devel")
|
||||
grid.NewLabel("guidevel,devel") // set the order of these in the config file ?
|
||||
grid.NextRow()
|
||||
|
||||
grid.NewButton("git checkout user", func() {
|
||||
|
@ -69,33 +69,7 @@ func globalBuildOptions(vbox *gui.Node) {
|
|||
// 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
|
||||
// works. Then, when that is good, merge and version everything in master
|
||||
grid.NewButton("set working mode:", func() {
|
||||
me.Disable()
|
||||
targetMode := me.newMode.String()
|
||||
log.Warn("setting all branches to", targetMode)
|
||||
if me.autoCreateBranches.Checked() {
|
||||
os.Setenv("AUTOTYPIST_CREATE_BRANCHES", "on")
|
||||
} else {
|
||||
os.Unsetenv("AUTOTYPIST_CREATE_BRANCHES")
|
||||
}
|
||||
switch me.newMode.String() {
|
||||
case "master":
|
||||
me.repos.View.ArgCheckoutMaster()
|
||||
case "devel":
|
||||
me.repos.View.ArgCheckoutDevel()
|
||||
case "user":
|
||||
me.repos.View.ArgCheckoutUser()
|
||||
}
|
||||
me.Enable()
|
||||
/*
|
||||
var count int
|
||||
for _, repo := range repolist.AllRepos() {
|
||||
if repo.ReadOnly() {
|
||||
continue
|
||||
}
|
||||
if targetName == repo.Status.GetCurrentBranchName() {
|
||||
continue
|
||||
}
|
||||
if repo.Status.BranchExists(targetName) {
|
||||
ok := repo.Status.CheckoutBranch(targetName)
|
||||
if ok {
|
||||
|
@ -122,17 +96,12 @@ func globalBuildOptions(vbox *gui.Node) {
|
|||
}
|
||||
repo.Scan()
|
||||
count += 1
|
||||
}
|
||||
*/
|
||||
})
|
||||
me.newMode = grid.NewDropdown()
|
||||
me.newMode.AddText("git default")
|
||||
me.newMode.AddText("devel")
|
||||
me.newMode.AddText("user")
|
||||
me.newMode.SetText("user")
|
||||
|
||||
grid.NextRow()
|
||||
grid.NewButton("git fetch master & devel", func() {
|
||||
|
||||
grid.NewGroup("update from upstream")
|
||||
grid.NewButton("git fetch master & devel branches", func() {
|
||||
me.Disable()
|
||||
defer me.Enable()
|
||||
log.Warn("updating all master branches")
|
||||
|
|
|
@ -71,7 +71,7 @@ func globalDisplayOptions(vbox *gui.Node) {
|
|||
})
|
||||
|
||||
var listallB *gui.Node
|
||||
listallB = group1.NewButton("go.wit.com", func() {
|
||||
listallB = group1.NewButton("Download Apps", func() {
|
||||
listallB.Disable()
|
||||
if me.lw == nil {
|
||||
me.lw = gowit.ListWindow(me.repos.View)
|
||||
|
|
|
@ -54,7 +54,7 @@ func makeRepoView() *repoWindow {
|
|||
log.Warn("Should I do something special here?")
|
||||
}
|
||||
|
||||
r.topbox = r.repoAllButtons()
|
||||
r.topbox = r.repoMenu()
|
||||
|
||||
r.View = repolist.AutotypistView(r.box)
|
||||
|
||||
|
@ -82,7 +82,7 @@ func (r *repoWindow) showApps() {
|
|||
}
|
||||
}
|
||||
|
||||
func (r *repoWindow) repoAllButtons() *gui.Node {
|
||||
func (r *repoWindow) repoMenu() *gui.Node {
|
||||
// reposbox.SetExpand(false)
|
||||
group1 := r.box.NewGroup("Run on all repos:")
|
||||
|
||||
|
|
Loading…
Reference in New Issue