trying to debug ENV settings
This commit is contained in:
parent
6286dd12e3
commit
cf4a391359
|
@ -30,6 +30,7 @@ func globalDisplayOptions(vbox *gui.Node) {
|
||||||
os.Unsetenv("AUTOTYPIST_READONLY")
|
os.Unsetenv("AUTOTYPIST_READONLY")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
os.Setenv("AUTOTYPIST_READONLY", "hide")
|
||||||
|
|
||||||
me.autoHidePerfect = group1.NewCheckbox("Hide Perfectly clean repos").SetChecked(true)
|
me.autoHidePerfect = group1.NewCheckbox("Hide Perfectly clean repos").SetChecked(true)
|
||||||
me.autoHidePerfect.Custom = func() {
|
me.autoHidePerfect.Custom = func() {
|
||||||
|
@ -39,6 +40,8 @@ func globalDisplayOptions(vbox *gui.Node) {
|
||||||
os.Unsetenv("AUTOTYPIST_CLEAN")
|
os.Unsetenv("AUTOTYPIST_CLEAN")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
os.Setenv("AUTOTYPIST_CLEAN", "hide")
|
||||||
|
|
||||||
scanbox := group1.Box().Horizontal()
|
scanbox := group1.Box().Horizontal()
|
||||||
me.autoScanReposCB = scanbox.NewCheckbox("auto scan").SetChecked(true)
|
me.autoScanReposCB = scanbox.NewCheckbox("auto scan").SetChecked(true)
|
||||||
me.autoScanReposCB.Custom = func() {
|
me.autoScanReposCB.Custom = func() {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"go.wit.com/lib/gui/repolist"
|
"go.wit.com/lib/gui/repolist"
|
||||||
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// like tcl/tk, use ENV variables to set display preferences
|
// like tcl/tk, use ENV variables to set display preferences
|
||||||
|
@ -17,8 +18,11 @@ func hideFunction(r *repolist.RepoRow) {
|
||||||
// hide read-only repos
|
// hide read-only repos
|
||||||
if os.Getenv("AUTOTYPIST_READONLY") == "hide" {
|
if os.Getenv("AUTOTYPIST_READONLY") == "hide" {
|
||||||
if r.Status.ReadOnly() {
|
if r.Status.ReadOnly() {
|
||||||
|
log.Info(r.Name(), "hiding read-only repo")
|
||||||
r.Hide()
|
r.Hide()
|
||||||
return
|
return
|
||||||
|
} else {
|
||||||
|
log.Info(r.Name(), "not hiding read-only repo")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue