diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go index 83a69d9..fe37833 100644 --- a/globalDisplayOptions.go +++ b/globalDisplayOptions.go @@ -30,6 +30,7 @@ func globalDisplayOptions(vbox *gui.Node) { os.Unsetenv("AUTOTYPIST_READONLY") } } + os.Setenv("AUTOTYPIST_READONLY", "hide") me.autoHidePerfect = group1.NewCheckbox("Hide Perfectly clean repos").SetChecked(true) me.autoHidePerfect.Custom = func() { @@ -39,6 +40,8 @@ func globalDisplayOptions(vbox *gui.Node) { os.Unsetenv("AUTOTYPIST_CLEAN") } } + os.Setenv("AUTOTYPIST_CLEAN", "hide") + scanbox := group1.Box().Horizontal() me.autoScanReposCB = scanbox.NewCheckbox("auto scan").SetChecked(true) me.autoScanReposCB.Custom = func() { diff --git a/hideFunction.go b/hideFunction.go index 9115026..c9dddcb 100644 --- a/hideFunction.go +++ b/hideFunction.go @@ -4,6 +4,7 @@ import ( "os" "go.wit.com/lib/gui/repolist" + "go.wit.com/log" ) // like tcl/tk, use ENV variables to set display preferences @@ -17,8 +18,11 @@ func hideFunction(r *repolist.RepoRow) { // hide read-only repos if os.Getenv("AUTOTYPIST_READONLY") == "hide" { if r.Status.ReadOnly() { + log.Info(r.Name(), "hiding read-only repo") r.Hide() return + } else { + log.Info(r.Name(), "not hiding read-only repo") } }