summaryrefslogtreecommitdiff
path: root/globalDisplayOptions.go
diff options
context:
space:
mode:
Diffstat (limited to 'globalDisplayOptions.go')
-rw-r--r--globalDisplayOptions.go51
1 files changed, 16 insertions, 35 deletions
diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go
index 6efb287..448f742 100644
--- a/globalDisplayOptions.go
+++ b/globalDisplayOptions.go
@@ -8,6 +8,7 @@ import (
"go.wit.com/gui"
"go.wit.com/lib/debugger"
+ "go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/logsettings"
"go.wit.com/log"
// "go.wit.com/gui/gadgets"
@@ -102,45 +103,25 @@ func globalDisplayOptions(box *gui.Node) {
fmt.Fprintln(f, ")")
})
- group1.NewButton("list all tags", func() {
- me.autotypistWindow.Disable()
- defer me.autotypistWindow.Enable()
- for _, repo := range me.allrepos {
- tagsW := repo.status.TagsW
- if tagsW == nil {
- repo.status.TagWindow()
- tagsW = repo.status.TagsW
- // tagsW.Prune()
- continue
- }
- allTags := tagsW.ListAll()
- for _, t := range allTags {
- log.Info("found tag:", t.TagString(), "from", repo.status.String())
- }
+ var tagsW *tagWindow
+ group1.NewButton("tag Window", func() {
+ if tagsW == nil {
+ tagsW = makeTagWindow()
+ } else {
+ tagsW.win.Toggle()
}
})
- group1.NewButton("delete all dup tags", func() {
- me.autotypistWindow.Disable()
- defer me.autotypistWindow.Enable()
- for _, repo := range me.allrepos {
- tagsW := repo.status.TagsW
- if tagsW == nil {
- repo.status.TagWindow()
- tagsW = repo.status.TagsW
- tagsW.PruneSmart()
- continue
- }
- deleteTags := tagsW.List()
- for _, t := range deleteTags {
- if me.autoDryRun.Checked() {
- log.Info("delete tag --dry-run:", t.TagString(), "from", repo.status.String())
- } else {
- log.Info("Deleting tag:", t.TagString(), "from", repo.status.String())
- // tagsW.Delete(t)
- }
- }
+ var listallB *gui.Node
+ var listW *gadgets.BasicWindow
+ listallB = group1.NewButton("go.wit.com Window", func() {
+ listallB.Disable()
+ if listW == nil {
+ listW = listWindow()
+ } else {
+ listW.Toggle()
}
+ listallB.Enable()
})
group2 := vbox.NewGroup("Debugger")