attempt to set repo.State
This commit is contained in:
parent
2cc7e7aa46
commit
ea35f3c0fb
|
@ -23,6 +23,7 @@ func (r *RepoRow) Hide() {
|
||||||
r.userVersion.Hide()
|
r.userVersion.Hide()
|
||||||
|
|
||||||
r.gitState.Hide()
|
r.gitState.Hide()
|
||||||
|
r.pbState.Hide()
|
||||||
r.endBox.Hide()
|
r.endBox.Hide()
|
||||||
r.targetV.Hide()
|
r.targetV.Hide()
|
||||||
r.hidden = true
|
r.hidden = true
|
||||||
|
@ -39,6 +40,7 @@ func (r *RepoRow) Show() {
|
||||||
r.userVersion.Show()
|
r.userVersion.Show()
|
||||||
|
|
||||||
r.gitState.Show()
|
r.gitState.Show()
|
||||||
|
r.pbState.Show()
|
||||||
r.endBox.Show()
|
r.endBox.Show()
|
||||||
r.targetV.Show()
|
r.targetV.Show()
|
||||||
r.hidden = false
|
r.hidden = false
|
||||||
|
@ -93,6 +95,7 @@ func (r *RepoList) AddRepo(pb *gitpb.Repo) (*RepoRow, error) {
|
||||||
newRepo.develVersion = r.reposgrid.NewLabel("")
|
newRepo.develVersion = r.reposgrid.NewLabel("")
|
||||||
newRepo.userVersion = r.reposgrid.NewLabel("")
|
newRepo.userVersion = r.reposgrid.NewLabel("")
|
||||||
newRepo.gitState = r.reposgrid.NewLabel("")
|
newRepo.gitState = r.reposgrid.NewLabel("")
|
||||||
|
newRepo.pbState = r.reposgrid.NewLabel("")
|
||||||
newRepo.currentName = r.reposgrid.NewLabel("")
|
newRepo.currentName = r.reposgrid.NewLabel("")
|
||||||
newRepo.currentVersion = r.reposgrid.NewLabel("")
|
newRepo.currentVersion = r.reposgrid.NewLabel("")
|
||||||
|
|
||||||
|
|
13
scan.go
13
scan.go
|
@ -56,23 +56,20 @@ func (r *RepoRow) NewScan() int {
|
||||||
return changed
|
return changed
|
||||||
}
|
}
|
||||||
|
|
||||||
// run the repostatus update
|
pb.Reload()
|
||||||
r.Status.Update()
|
|
||||||
|
|
||||||
if r.lastTag != nil {
|
if r.lastTag != nil {
|
||||||
r.lastTag.SetLabel(pb.GetLastTag())
|
r.lastTag.SetLabel(pb.GetLastTag())
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.masterVersion == nil {
|
// run the repostatus update
|
||||||
panic("what the fuck node")
|
r.Status.Update()
|
||||||
}
|
|
||||||
|
|
||||||
pb.State = r.Status.GitState()
|
|
||||||
|
|
||||||
r.masterVersion.SetLabel(pb.GetMasterVersion())
|
r.masterVersion.SetLabel(pb.GetMasterVersion())
|
||||||
r.develVersion.SetLabel(pb.GetDevelVersion())
|
r.develVersion.SetLabel(pb.GetDevelVersion())
|
||||||
r.userVersion.SetLabel(pb.GetUserVersion())
|
r.userVersion.SetLabel(pb.GetUserVersion())
|
||||||
r.gitState.SetLabel(pb.GetState())
|
r.gitState.SetLabel(r.Status.CheckGitState())
|
||||||
|
r.pbState.SetLabel(pb.GetState())
|
||||||
r.currentName.SetLabel(pb.GetCurrentBranchName())
|
r.currentName.SetLabel(pb.GetCurrentBranchName())
|
||||||
r.currentVersion.SetLabel(pb.GetCurrentBranchVersion())
|
r.currentVersion.SetLabel(pb.GetCurrentBranchVersion())
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ type RepoRow struct {
|
||||||
currentName *gui.Node // current branch name
|
currentName *gui.Node // current branch name
|
||||||
currentVersion *gui.Node // current branch version
|
currentVersion *gui.Node // current branch version
|
||||||
gitState *gui.Node // git state (dirty or not?)
|
gitState *gui.Node // git state (dirty or not?)
|
||||||
// goState *gui.Node // what is the state of the go.sum file
|
pbState *gui.Node // the state of the protobuf
|
||||||
|
|
||||||
masterVersion *gui.Node // the master branch version
|
masterVersion *gui.Node // the master branch version
|
||||||
develVersion *gui.Node // the devel branch version
|
develVersion *gui.Node // the devel branch version
|
||||||
|
|
|
@ -21,6 +21,7 @@ func (rl *RepoList) AutotypistView(parent *gui.Node) {
|
||||||
rl.reposgrid.NewLabel("devel version")
|
rl.reposgrid.NewLabel("devel version")
|
||||||
rl.reposgrid.NewLabel("user version")
|
rl.reposgrid.NewLabel("user version")
|
||||||
rl.reposgrid.NewLabel("Status")
|
rl.reposgrid.NewLabel("Status")
|
||||||
|
rl.reposgrid.NewLabel("pb state")
|
||||||
rl.reposgrid.NewLabel("Current").SetProgName("CurrentName")
|
rl.reposgrid.NewLabel("Current").SetProgName("CurrentName")
|
||||||
rl.reposgrid.NewLabel("Version").SetProgName("CurrentVersion")
|
rl.reposgrid.NewLabel("Version").SetProgName("CurrentVersion")
|
||||||
rl.reposgrid.NextRow()
|
rl.reposgrid.NextRow()
|
||||||
|
|
Loading…
Reference in New Issue