diff --git a/draw.go b/draw.go index 183bb7b..22a3275 100644 --- a/draw.go +++ b/draw.go @@ -348,7 +348,7 @@ func (rs *RepoStatus) setGitCommands() { tmp = append(tmp, s) } - rs.versionCmdOutput.SetText(strings.Join(tmp, "\n")) + rs.versionCmdOutput.SetValue(strings.Join(tmp, "\n")) } func (rs *RepoStatus) setMergeDevelCommands() { @@ -375,7 +375,7 @@ func (rs *RepoStatus) setMergeDevelCommands() { tmp = append(tmp, s) } - rs.versionCmdOutput.SetText(strings.Join(tmp, "\n")) + rs.versionCmdOutput.SetValue(strings.Join(tmp, "\n")) } func (rs *RepoStatus) setMergeUserCommands() { @@ -402,5 +402,5 @@ func (rs *RepoStatus) setMergeUserCommands() { tmp = append(tmp, s) } - rs.versionCmdOutput.SetText(strings.Join(tmp, "\n")) + rs.versionCmdOutput.SetValue(strings.Join(tmp, "\n")) } diff --git a/git.go b/git.go index d62920a..a90ac57 100644 --- a/git.go +++ b/git.go @@ -32,14 +32,14 @@ func (rs *RepoStatus) GetLastTagVersion() string { func (rs *RepoStatus) getCurrentBranchName() string { out := run(rs.repopath, "git", "branch --show-current") log.Warn("getCurrentBranchName() =", out) - rs.currentBranch.SetText(out) + rs.currentBranch.SetValue(out) return out } func (rs *RepoStatus) getCurrentBranchVersion() string { out := run(rs.repopath, "git", "describe --tags") log.Warn("getCurrentBranchVersion()", out) - rs.currentVersion.SetText(out) + rs.currentVersion.SetValue(out) return out } @@ -51,7 +51,7 @@ func (rs *RepoStatus) getLastTagVersion() string { lastreal := "describe --tags " + out // out = run(r.path, "git", "describe --tags c871d5ecf051a7dc4e3a77157cdbc0a457eb9ae1") out = run(rs.repopath, "git", lastreal) - rs.lasttag.SetText(out) + rs.lasttag.SetValue(out) rs.tagsDrop.SetText(out) // rs.lastLabel.SetText(out) return out @@ -109,17 +109,17 @@ func (rs *RepoStatus) CheckDirty() bool { log.Warn("CheckDirty() out =", out) log.Warn("CheckDirty() err =", err) log.Error(err, "CheckDirty() error") - rs.dirtyLabel.SetText("error") + rs.dirtyLabel.SetValue("error") return true } if b { log.Warn("CheckDirty() b =", b, "path =", path, "out =", out) log.Warn("CheckDirty() no", rs.repopath) - rs.dirtyLabel.SetText("no") + rs.dirtyLabel.SetValue("no") return false } log.Warn("CheckDirty() true", rs.repopath) - rs.dirtyLabel.SetText("dirty") + rs.dirtyLabel.SetValue("dirty") return true } @@ -147,11 +147,11 @@ func (rs *RepoStatus) checkoutBranch(level string, branch string) { switch level { case "master": - rs.masterBranchVersion.SetText(realversion) + rs.masterBranchVersion.SetValue(realversion) case "devel": - rs.develBranchVersion.SetText(realversion) + rs.develBranchVersion.SetValue(realversion) case "user": - rs.userBranchVersion.SetText(realversion) + rs.userBranchVersion.SetValue(realversion) default: } } diff --git a/timer.go b/timer.go index 380e4bb..067a85a 100644 --- a/timer.go +++ b/timer.go @@ -15,5 +15,5 @@ func (ls *RepoStatus) SetSpeedActual(s string) { if !ls.Ready() { return } - ls.speedActual.SetText(s) + ls.speedActual.SetValue(s) } diff --git a/update.go b/update.go index e51f55f..6033fb7 100644 --- a/update.go +++ b/update.go @@ -17,19 +17,12 @@ func (rs *RepoStatus) Update() { log.Log(WARN, "Update() START") duration := timeFunction(func() { // do things that are safe even if the git tree is dirty - log.Warn("path.SetText()") - rs.path.SetText(rs.repopath) - log.Warn("getCurrentBranchName()") + rs.path.SetValue(rs.repopath) rs.getCurrentBranchName() - log.Warn("set window Title()") rs.window.Title(rs.repopath + " GO repo Details") - log.Warn("getCurrentBranchVersion()") rs.getCurrentBranchVersion() - log.Warn("getLastTagVersion()") rs.getLastTagVersion() - log.Warn("populateTags()") rs.populateTags() - log.Warn("CheckDirty()") rs.CheckDirty() if rs.dirtyLabel.String() != "no" { @@ -67,14 +60,14 @@ func (rs *RepoStatus) setSpeed(duration time.Duration) { log.Log(WARN, "can't actually warn") return } - rs.speedActual.SetText(s) + rs.speedActual.SetValue(s) if duration > 500*time.Millisecond { - rs.speed.SetText("SLOW") + rs.speed.SetValue("SLOW") } else if duration > 100*time.Millisecond { - rs.speed.SetText("OK") + rs.speed.SetValue("OK") } else { - rs.speed.SetText("FAST") + rs.speed.SetValue("FAST") } }