diff options
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() { |
