summaryrefslogtreecommitdiff
path: root/globalDisplayOptions.go
diff options
context:
space:
mode:
Diffstat (limited to 'globalDisplayOptions.go')
-rw-r--r--globalDisplayOptions.go69
1 files changed, 43 insertions, 26 deletions
diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go
index a3f572d..dfe4623 100644
--- a/globalDisplayOptions.go
+++ b/globalDisplayOptions.go
@@ -68,7 +68,9 @@ func globalDisplayOptions(box *gui.Node) {
group1 := vbox.NewGroup("Global Display Options")
- group1.NewButton("Show Repository Window", func() {
+ hidegrid := group1.NewGrid("hidecfg", 0, 0)
+
+ hidegrid.NewButton("Show Repository Window", func() {
if me.repos.Hidden() {
me.repos.Show()
} else {
@@ -83,8 +85,9 @@ func globalDisplayOptions(box *gui.Node) {
// double check the found next repo
// fullDoubleCheckFix()
})
+ hidegrid.NextRow()
- me.autoHideReadOnly = group1.NewCheckbox("Hide read-only repos").SetChecked(true)
+ me.autoHideReadOnly = hidegrid.NewCheckbox("Hide read-only repos").SetChecked(true)
me.autoHideReadOnly.Custom = func() {
if me.autoHideReadOnly.Checked() {
showHideRepos()
@@ -92,8 +95,9 @@ func globalDisplayOptions(box *gui.Node) {
globalDisplayShow()
}
}
+ hidegrid.NextRow()
- me.autoHidePerfect = group1.NewCheckbox("Hide Perfectly clean repos").SetChecked(true)
+ me.autoHidePerfect = hidegrid.NewCheckbox("Hide Perfectly clean repos").SetChecked(true)
me.autoHidePerfect.Custom = func() {
if me.autoHidePerfect.Checked() {
showHideRepos()
@@ -101,8 +105,9 @@ func globalDisplayOptions(box *gui.Node) {
globalDisplayShow()
}
}
+ hidegrid.NextRow()
- me.autoReleased = group1.NewCheckbox("Hide RELEASED repos").SetChecked(false)
+ me.autoReleased = hidegrid.NewCheckbox("Hide RELEASED repos").SetChecked(false)
me.autoReleased.Custom = func() {
if me.autoReleased.Checked() {
for _, repo := range me.repos.View.AllRepos() {
@@ -116,12 +121,28 @@ func globalDisplayOptions(box *gui.Node) {
}
}
}
+ hidegrid.NextRow()
+
+ me.ignoreWhitelist = hidegrid.NewCheckbox("ignore whitelist (are you sure?)").SetChecked(false)
+ hidegrid.NextRow()
- me.ignoreWhitelist = group1.NewCheckbox("ignore whitelist (are you sure?)").SetChecked(false)
+ me.scanEveryMinute = hidegrid.NewCheckbox("Scan every minute").SetChecked(false)
+ hidegrid.NewButton("scan now", func() {
+ log.Info("re-scanning repos now")
+ i, s := me.repos.View.ScanRepositories()
+ log.Info("re-scanning repos done", i, s)
+ me.duration.SetText(s)
+ })
+ me.duration = hidegrid.NewLabel("")
+ hidegrid.NextRow()
- me.scanEveryMinute = group1.NewCheckbox("Scan every minute").SetChecked(false)
+ grid := group1.NewGrid("test", 0, 0)
- me.setBranchesToMasterB = group1.NewButton("set all branches to master", func() {
+ grid.NewButton("git checkout master", func() {
+ setBranchToMaster()
+ })
+
+ me.setBranchesToMasterB = grid.NewButton("set all branches to master", func() {
me.Disable()
for _, repo := range me.repos.View.AllRepos() {
if repo.Status.ReadOnly() {
@@ -145,7 +166,7 @@ func globalDisplayOptions(box *gui.Node) {
})
var longB *gui.Node
- longB = group1.NewButton("redo go.sum", func() {
+ longB = grid.NewButton("redo go.sum", func() {
os.Unsetenv("GO111MODULE")
longB.Disable()
me.Disable()
@@ -170,7 +191,12 @@ func globalDisplayOptions(box *gui.Node) {
longB.Enable()
})
- group1.NewButton("rm -f go.mod go.sum", func() {
+ grid.NewButton("set target version", func() {
+ setTargetVersion()
+ })
+ grid.NextRow()
+
+ grid.NewButton("rm -f go.mod go.sum", func() {
me.Disable()
for _, repo := range me.repos.View.AllRepos() {
if whitelist(repo.GoPath()) {
@@ -184,7 +210,7 @@ func globalDisplayOptions(box *gui.Node) {
me.Enable()
})
- group1.NewButton("git reset --hard", func() {
+ grid.NewButton("git reset --hard", func() {
me.Disable()
for _, repo := range me.repos.View.AllRepos() {
if whitelist(repo.GoPath()) {
@@ -197,7 +223,7 @@ func globalDisplayOptions(box *gui.Node) {
me.Enable()
})
- group1.NewButton("git ls-files |grep go.mod", func() {
+ grid.NewButton("git ls-files |grep go.mod", func() {
// var all []string
for _, repo := range me.repos.View.AllRepos() {
log.Info("repo:", repo.Name())
@@ -239,29 +265,20 @@ func globalDisplayOptions(box *gui.Node) {
}
log.Info("All repos seem okay")
})
+ grid.NextRow()
- group1.NewButton("git checkout master", func() {
- setBranchToMaster()
- })
-
- group1.NewButton("set target version", func() {
- setTargetVersion()
- })
-
- group1.NewButton("re-scan all repos", func() {
- me.repos.View.ScanRepositories()
- })
-
- group1.NewButton("scanForReady()", func() {
+ grid.NewButton("scanForReady()", func() {
scanForReady()
})
group2 := vbox.NewGroup("Debugger")
- group2.NewButton("logging Window", func() {
+ dbggrid := group2.NewGrid("gdb", 0, 0)
+ dbggrid.NewButton("logging Window", func() {
logsettings.LogWindow()
})
+ dbggrid.NextRow()
- group2.NewButton("Debugger Window", func() {
+ dbggrid.NewButton("Debugger Window", func() {
debugger.DebugWindow()
})
}