attempt to set repo.State

This commit is contained in:
Jeff Carr 2025-01-07 20:35:43 -06:00
parent 2cc7e7aa46
commit ea35f3c0fb
4 changed files with 10 additions and 9 deletions

View File

@ -23,6 +23,7 @@ func (r *RepoRow) Hide() {
r.userVersion.Hide()
r.gitState.Hide()
r.pbState.Hide()
r.endBox.Hide()
r.targetV.Hide()
r.hidden = true
@ -39,6 +40,7 @@ func (r *RepoRow) Show() {
r.userVersion.Show()
r.gitState.Show()
r.pbState.Show()
r.endBox.Show()
r.targetV.Show()
r.hidden = false
@ -93,6 +95,7 @@ func (r *RepoList) AddRepo(pb *gitpb.Repo) (*RepoRow, error) {
newRepo.develVersion = r.reposgrid.NewLabel("")
newRepo.userVersion = r.reposgrid.NewLabel("")
newRepo.gitState = r.reposgrid.NewLabel("")
newRepo.pbState = r.reposgrid.NewLabel("")
newRepo.currentName = r.reposgrid.NewLabel("")
newRepo.currentVersion = r.reposgrid.NewLabel("")

13
scan.go
View File

@ -56,23 +56,20 @@ func (r *RepoRow) NewScan() int {
return changed
}
// run the repostatus update
r.Status.Update()
pb.Reload()
if r.lastTag != nil {
r.lastTag.SetLabel(pb.GetLastTag())
}
if r.masterVersion == nil {
panic("what the fuck node")
}
pb.State = r.Status.GitState()
// run the repostatus update
r.Status.Update()
r.masterVersion.SetLabel(pb.GetMasterVersion())
r.develVersion.SetLabel(pb.GetDevelVersion())
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.currentVersion.SetLabel(pb.GetCurrentBranchVersion())

View File

@ -63,7 +63,7 @@ type RepoRow struct {
currentName *gui.Node // current branch name
currentVersion *gui.Node // current branch version
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
develVersion *gui.Node // the devel branch version

View File

@ -21,6 +21,7 @@ func (rl *RepoList) AutotypistView(parent *gui.Node) {
rl.reposgrid.NewLabel("devel version")
rl.reposgrid.NewLabel("user version")
rl.reposgrid.NewLabel("Status")
rl.reposgrid.NewLabel("pb state")
rl.reposgrid.NewLabel("Current").SetProgName("CurrentName")
rl.reposgrid.NewLabel("Version").SetProgName("CurrentVersion")
rl.reposgrid.NextRow()