summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-19 14:42:59 -0600
committerJeff Carr <[email protected]>2024-02-19 14:42:59 -0600
commitad21d5d5db43b975e88067ff730691e89e10ea97 (patch)
tree6df12661892c57d20130cb85a8380ff63bda4ad6 /common.go
parentbe73f6af0ea749ba87f301b85e60a4b95f1b8038 (diff)
experiment with widget 'mirror'
Diffstat (limited to 'common.go')
-rw-r--r--common.go36
1 files changed, 19 insertions, 17 deletions
diff --git a/common.go b/common.go
index d786ce1..dca7126 100644
--- a/common.go
+++ b/common.go
@@ -3,6 +3,7 @@ package repostatus
import (
"strings"
+ "go.wit.com/gui"
"go.wit.com/log"
// "go.wit.com/gui/gui"
)
@@ -41,7 +42,7 @@ func (rs *RepoStatus) GoName() string {
// not sure which name is easier to remember. probably this one
func (rs *RepoStatus) GoPath() string {
- return rs.goSrcPath.String()
+ return rs.goPath.String()
}
// returns the filesystem path to the repo
@@ -49,22 +50,6 @@ func (rs *RepoStatus) Path() string {
return rs.realPath.String()
}
-/*
-func (rs *RepoStatus) GetPath() string {
- return rs.path.String()
-}
-*/
-
-/*
-func (rs *RepoStatus) Draw() {
- if !rs.Ready() {
- return
- }
- log.Log(CHANGE, "Draw() window ready =", rs.ready)
- rs.window.TestDraw()
-}
-*/
-
func (rs *RepoStatus) Show() {
if !rs.Ready() {
return
@@ -190,3 +175,20 @@ func (rs *RepoStatus) SetTargetVersion(s string) {
// func (rs *RepoStatus) setTag() bool {
rs.targetReleaseVersion.SetText(s)
}
+
+// returns a widget of the last tag that acts as a mirror
+func (rs *RepoStatus) MirrorLastTag() *gui.Node {
+ return rs.lasttag.MirrorValue()
+}
+
+func (rs *RepoStatus) MirrorTargetVersion() *gui.Node {
+ return rs.targetReleaseVersion.MirrorValue()
+}
+
+func (rs *RepoStatus) MirrorCurrentVersion() *gui.Node {
+ return rs.currentVersion.MirrorValue()
+}
+
+func (rs *RepoStatus) MirrorCurrentName() *gui.Node {
+ return rs.currentBranch.MirrorValue()
+}