diff --git a/doGui.go b/doGui.go index a5c9cb6..bc0fbdd 100644 --- a/doGui.go +++ b/doGui.go @@ -54,6 +54,8 @@ func doGui() { } func drawWindow(win *gadgets.BasicWindow) { + var reposWin *repoWindow // this is the handle to the repo window + box := win.Box() vbox := box.NewVerticalBox("BOX2") @@ -94,6 +96,9 @@ func drawWindow(win *gadgets.BasicWindow) { // 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 me.setBranchB = grid.NewButton("git checkout", func() { + if reposWin != nil { + reposWin.Hide() + } targetName := me.newBranch.String() log.Warn("setting all branches to", targetName) if targetName == "devel" { @@ -123,8 +128,6 @@ func drawWindow(win *gadgets.BasicWindow) { me.autoCreateBranches = grid.NewCheckbox("auto create branches").SetChecked(true) grid.NextRow() - var reposWin *repoWindow - grid.NewButton("Repo Window", func() { if reposWin != nil { if reposWin.Hidden() {