summaryrefslogtreecommitdiff
path: root/branchesBox.go
blob: a14a5b2ec64d073f45d83629ce4a3fee0d8956d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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()

}