summaryrefslogtreecommitdiff
path: root/globalDisplayOptions.go
diff options
context:
space:
mode:
Diffstat (limited to 'globalDisplayOptions.go')
-rw-r--r--globalDisplayOptions.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/globalDisplayOptions.go b/globalDisplayOptions.go
index e5489f7..055f0ab 100644
--- a/globalDisplayOptions.go
+++ b/globalDisplayOptions.go
@@ -27,10 +27,14 @@ func globalDisplayOptions(box *gui.Node) {
hidegrid.NextRow()
me.autoHideReadOnly = hidegrid.NewCheckbox("Hide read-only repos").SetChecked(true)
- // me.autoHideReadOnly.Custom = func() {
- // log.Info("registered hide function to globalDisplayShow()")
- // me.repos.View.RegisterHideFunction(globalDisplayShow)
- // }
+ me.autoHideReadOnly.Custom = func() {
+ if me.autoHideReadOnly.Checked() {
+ os.Setenv("AUTOTYPIST_READONLY", "hide")
+ } else {
+ os.Unsetenv("AUTOTYPIST_READONLY")
+ }
+ }
+ os.Setenv("AUTOTYPIST_READONLY", "hide")
hidegrid.NextRow()
me.autoHideReleased = hidegrid.NewCheckbox("Hide Released repos").SetChecked(true)