diff options
| author | Jeff Carr <[email protected]> | 2024-02-12 06:23:31 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-12 06:23:31 -0600 |
| commit | ba4051cb0c0f253a41d2b7675fc4e37872230df4 (patch) | |
| tree | e9c4612fe97d91a00cfd69b81869fd5efdbca2fe /draw.go | |
| parent | 2b172338f61d0f0b003b5c8198b979b24d3b60ac (diff) | |
smarter tag window
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'draw.go')
| -rw-r--r-- | draw.go | 46 |
1 files changed, 12 insertions, 34 deletions
@@ -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() { |
