summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-07 20:35:43 -0600
committerJeff Carr <[email protected]>2025-01-07 20:35:43 -0600
commitea35f3c0fb4d3ac45569ed6a4715f7f1a25e4a02 (patch)
treef2660002cb37c126bb543dac2b87304fc2ec05cb
parent2cc7e7aa46615cb2a8e559d31bf4db9ed203bbf7 (diff)
attempt to set repo.State
-rw-r--r--newRepo.go3
-rw-r--r--scan.go13
-rw-r--r--structs.go2
-rw-r--r--viewAutotypist.go1
4 files changed, 10 insertions, 9 deletions
diff --git a/newRepo.go b/newRepo.go
index d0e5588..2a4d0ef 100644
--- a/newRepo.go
+++ b/newRepo.go
@@ -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("")
diff --git a/scan.go b/scan.go
index f13f83a..39e2836 100644
--- a/scan.go
+++ b/scan.go
@@ -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())
diff --git a/structs.go b/structs.go
index 9e33d1a..ae3874b 100644
--- a/structs.go
+++ b/structs.go
@@ -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
diff --git a/viewAutotypist.go b/viewAutotypist.go
index 090b37e..ae8a615 100644
--- a/viewAutotypist.go
+++ b/viewAutotypist.go
@@ -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()