summaryrefslogtreecommitdiff
path: root/tagWindow.go
diff options
context:
space:
mode:
Diffstat (limited to 'tagWindow.go')
-rw-r--r--tagWindow.go21
1 files changed, 11 insertions, 10 deletions
diff --git a/tagWindow.go b/tagWindow.go
index f40aa9d..df89062 100644
--- a/tagWindow.go
+++ b/tagWindow.go
@@ -5,6 +5,7 @@ import (
"go.wit.com/log"
"go.wit.com/lib/gadgets"
+ "go.wit.com/lib/gui/repolist"
"go.wit.com/lib/gui/repostatus"
)
@@ -46,10 +47,10 @@ func makeTagWindow() *tagWindow {
topGrid.NewButton("list all tags", func() {
me.autotypistWindow.Disable()
defer me.autotypistWindow.Enable()
- for _, repo := range me.allrepos {
- allTags := repo.status.Tags.ListAll()
+ for _, repo := range repolist.AllRepos() {
+ allTags := repo.AllTags()
for _, t := range allTags {
- log.Info("found tag:", t.TagString(), "from", repo.status.String())
+ log.Info("found tag:", t.TagString(), "from", repo.String())
}
}
}).SetProgName("TAGSLISTALL")
@@ -57,27 +58,27 @@ func makeTagWindow() *tagWindow {
topGrid.NewButton("delete all dup tags", func() {
me.autotypistWindow.Disable()
defer me.autotypistWindow.Enable()
- for _, repo := range me.allrepos {
+ for _, repo := range repolist.AllRepos() {
if repo.String() == "go.wit.com/lib/gadgets" {
// only do log for now
} else {
// continue
}
- tagsW := repo.status.Tags
+ tagsW := repo.TagsBox()
tagsW.PruneSmart()
deleteTags := tagsW.List()
for _, t := range deleteTags {
tagW.grid.NewLabel(t.TagString())
- tagW.grid.NewLabel(repo.status.String())
+ tagW.grid.NewLabel(repo.String())
tagW.grid.NewButton("delete", func() {
- repo.status.DeleteTag(t)
+ repo.DeleteTag(t)
})
tagW.grid.NextRow()
if me.autoDryRun.Checked() {
- log.Info("delete tag --dry-run:", t.TagString(), "from", repo.status.String())
+ log.Info("delete tag --dry-run:", t.TagString(), "from", repo.String())
} else {
- log.Info("Deleting tag:", t.TagString(), "from", repo.status.String())
- go repo.status.DeleteTag(t)
+ log.Info("Deleting tag:", t.TagString(), "from", repo.String())
+ go repo.DeleteTag(t)
log.Sleep(1)
}
}