repostatus/branchesBox.go

38 lines
758 B
Go
Raw Permalink Normal View History

package repostatus
import (
"go.wit.com/gui"
"go.wit.com/log"
)
func (rs *RepoStatus) makeBranchesBox(parent *gui.Node) {
2025-01-30 13:35:22 -06:00
repo := rs.pb
rs.gitBranchesGroup = parent.NewGroup("branches") // `progname:"BRANCHES"` // can the toolkits use these for i18n support?
2025-01-30 13:35:22 -06:00
grid := rs.gitBranchesGroup.RawGrid()
var win *repoBranchesWindow
2025-01-30 13:35:22 -06:00
grid.NewButton("Branches Window", func() {
if win != nil {
win.Toggle()
return
}
2025-01-29 00:52:49 -06:00
log.Info("redo this")
2025-01-30 13:35:22 -06:00
win = MakeRepoBranchesWindow(repo)
win.Show()
})
2025-01-30 13:35:22 -06:00
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()
}