repostatus/branchesBox.go

38 lines
758 B
Go

package repostatus
import (
"go.wit.com/gui"
"go.wit.com/log"
)
func (rs *RepoStatus) makeBranchesBox(parent *gui.Node) {
repo := rs.pb
rs.gitBranchesGroup = parent.NewGroup("branches") // `progname:"BRANCHES"` // can the toolkits use these for i18n support?
grid := rs.gitBranchesGroup.RawGrid()
var win *repoBranchesWindow
grid.NewButton("Branches Window", func() {
if win != nil {
win.Toggle()
return
}
log.Info("redo this")
win = MakeRepoBranchesWindow(repo)
win.Show()
})
grid.NextRow()
var mergeWin *repoMergeWindow
grid.NewButton("Merge Window", func() {
if mergeWin != nil {
mergeWin.Toggle()
return
}
log.Info("redo this")
mergeWin = rs.MakeRepoMergeWindow(repo)
mergeWin.Show()
})
grid.NextRow()
}