summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-29 19:51:28 -0600
committerJeff Carr <[email protected]>2024-02-29 19:51:28 -0600
commit5aa110ae8b5e643cdb40d8e8e415bf77d08ffd53 (patch)
treede986187eb84853f439d528be32de64f6f34a74c
parent2c1cd3343bfc0d3c032965da9eed62ea511bb3b8 (diff)
guireleaser works again
-rw-r--r--globalDisplayOptions.go12
-rw-r--r--hideFunction.go31
2 files changed, 18 insertions, 25 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)
diff --git a/hideFunction.go b/hideFunction.go
index 30bf485..a9f835b 100644
--- a/hideFunction.go
+++ b/hideFunction.go
@@ -20,6 +20,12 @@ func hideFunction(r *repolist.RepoRow) {
return
}
+ // always show repos that have not been merged ?
+ if r.GoState() == "merge to devel" {
+ r.Show()
+ return
+ }
+
// hide read-only repos
if os.Getenv("AUTOTYPIST_READONLY") == "hide" {
if r.Status.ReadOnly() {
@@ -41,9 +47,8 @@ func hideFunction(r *repolist.RepoRow) {
}
}
- // hide perfectly clean repos
- if os.Getenv("AUTOTYPIST_CLEAN") == "hide" {
- if r.IsPerfect() {
+ if me.autoHideReleased.Checked() {
+ if r.Status.IsReleased() {
r.Hide()
return
}
@@ -55,30 +60,13 @@ func hideFunction(r *repolist.RepoRow) {
r.Show()
}
+/*
func showHideRepos(repo *repolist.RepoRow) {
if repo.GoPath() == "go.wit.com/dev/alexflint/arg" {
log.Info("found autoHideReleased() =", me.autoHideReleased.Checked())
log.Info("found alexflint/arg IsReleased() =", repo.Status.IsReleased())
}
- // always show dirty repos
- if repo.IsDirty() {
- repo.Show()
- return
- }
- // always show repos that have not been merged ?
- if repo.GoState() == "merge to devel" {
- repo.Show()
- return
- }
- // hide read-only repos. These are repos that do not
- // match things in the users config file (.config/autotypist)
- if me.autoHideReadOnly.Checked() {
- if repo.Status.ReadOnly() {
- repo.Hide()
- return
- }
- }
if me.autoHideReleased.Checked() {
if repo.Status.IsReleased() {
repo.Hide()
@@ -87,3 +75,4 @@ func showHideRepos(repo *repolist.RepoRow) {
}
repo.Show()
}
+*/