allow user to switch branches
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
294119e7c2
commit
2f4cba36dd
15
draw.go
15
draw.go
|
@ -36,8 +36,23 @@ func (rs *RepoStatus) drawGitBranches() {
|
|||
newgrid := rs.gitBranchesGroup.NewGrid("gridnuts", 2, 2)
|
||||
|
||||
rs.masterDrop = gadgets.NewBasicDropdown(newgrid, "main branch")
|
||||
rs.masterDrop.Custom = func () {
|
||||
log.Log(WARN, "Switching main branch to:", rs.masterDrop.String())
|
||||
rs.masterBranchVersion.SetLabel(rs.masterDrop.String())
|
||||
rs.mainWorkingName.SetValue(rs.masterDrop.String())
|
||||
}
|
||||
rs.develDrop = gadgets.NewBasicDropdown(newgrid, "devel branch")
|
||||
rs.develDrop.Custom = func () {
|
||||
log.Log(WARN, "Switching devel branch to:", rs.develDrop.String())
|
||||
rs.develBranchVersion.SetLabel(rs.develDrop.String())
|
||||
rs.develWorkingName.SetValue(rs.develDrop.String())
|
||||
}
|
||||
rs.userDrop = gadgets.NewBasicDropdown(newgrid, "user branch")
|
||||
rs.userDrop.Custom = func () {
|
||||
log.Log(WARN, "Switching user branch to:", rs.userDrop.String())
|
||||
rs.userBranchVersion.SetLabel(rs.userDrop.String())
|
||||
rs.userWorkingName.SetValue(rs.userDrop.String())
|
||||
}
|
||||
|
||||
rs.lasttag = gadgets.NewOneLiner(newgrid, "last tag")
|
||||
|
||||
|
|
Loading…
Reference in New Issue