summaryrefslogtreecommitdiff
path: root/draw.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-12 06:23:31 -0600
committerJeff Carr <[email protected]>2024-02-12 06:23:31 -0600
commitba4051cb0c0f253a41d2b7675fc4e37872230df4 (patch)
treee9c4612fe97d91a00cfd69b81869fd5efdbca2fe /draw.go
parent2b172338f61d0f0b003b5c8198b979b24d3b60ac (diff)
smarter tag window
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'draw.go')
-rw-r--r--draw.go46
1 files changed, 12 insertions, 34 deletions
diff --git a/draw.go b/draw.go
index 8a89255..c1094c2 100644
--- a/draw.go
+++ b/draw.go
@@ -77,42 +77,20 @@ func (rs *RepoStatus) drawGitBranches() {
}
})
+ rs.TagsW = rs.TagWindow()
+
newgrid.NewButton("Show tags", func() {
- tw := rs.TagWindow()
- tw.Prune()
- // git tag --list --sort=taggerdate
- // git for-each-ref --sort=taggerdate --format '%(tag) %(*objectname) %(taggerdate)'
- // git rev-parse HEAD
- // if last tag == HEAD, then remove it
+ if rs.TagsW == nil {
+ log.Warn("error: found rs.TagsW == nil")
+ rs.TagsW = rs.TagWindow()
+ return
+ }
+ if rs.TagsW.Hidden() {
+ rs.TagsW.Show()
+ } else {
+ rs.TagsW.Show()
+ }
})
-
- /*
- newgrid.NewButton("CheckSafeGoSumRemake()", func() {
- if ok, bad := rs.CheckSafeGoSumRemake(); ok {
- log.Log(WARN, "CheckSafeGoSumRemake() is safe to redo")
- } else {
- log.Log(WARN, "CheckSafeGoSumRemake() is not safe. problems:", bad)
- }
- })
-
- newgrid.NewButton("CheckGoSum()", func() {
- if ok, missing := rs.CheckGoSum(); ok {
- log.Log(WARN, "CheckGoSum() is ok")
- } else {
- log.Log(WARN, "CheckGoSum() is not ok. missing:", missing)
- }
- })
- newgrid.NewButton("CheckPrimativeGoMod()", func() {
- if rs.CheckPrimativeGoMod() {
- log.Log(WARN, "is primative")
- } else {
- log.Log(WARN, "is not primative")
- }
- })
- newgrid.NewButton("MakeRedomod()", func() {
- rs.MakeRedomod()
- })
- */
}
func (rs *RepoStatus) drawGitStatus() {