summary refs log tree commit diff
path: root/group.c
diff options
context:
space:
mode:
authorokan <okan>2019-03-07 12:54:21 +0000
committerokan <okan>2019-03-07 12:54:21 +0000
commitb26202724a342b596692b5e9b1f47c7c491a1934 (patch)
treeb5ef1c48db1c3158ddb7d6a5b1834fc5653dfc23 /group.c
parent9efa6c8c85780c3d5604d0686c943627765dd1a5 (diff)
downloadcwm-b26202724a342b596692b5e9b1f47c7c491a1934.tar.gz
cwm-b26202724a342b596692b5e9b1f47c7c491a1934.tar.xz
cwm-b26202724a342b596692b5e9b1f47c7c491a1934.zip
shuffle deck chairs: rename group actions to match intent for clarity
Diffstat (limited to 'group.c')
-rw-r--r--group.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/group.c b/group.c
index eee916f..c1788eb 100644
--- a/group.c
+++ b/group.c
@@ -204,7 +204,20 @@ group_holds_only_hidden(struct group_ctx *gc)
 }
 
 void
-group_hidetoggle(struct screen_ctx *sc, int idx)
+group_only(struct screen_ctx *sc, int idx)
+{
+	struct group_ctx	*gc;
+
+	TAILQ_FOREACH(gc, &sc->groupq, entry) {
+		if (gc->num == idx)
+			group_show(gc);
+		else
+			group_hide(gc);
+	}
+}
+
+void
+group_toggle(struct screen_ctx *sc, int idx)
 {
 	struct group_ctx	*gc;
 
@@ -223,16 +236,17 @@ group_hidetoggle(struct screen_ctx *sc, int idx)
 }
 
 void
-group_only(struct screen_ctx *sc, int idx)
+group_toggle_all(struct screen_ctx *sc)
 {
 	struct group_ctx	*gc;
 
 	TAILQ_FOREACH(gc, &sc->groupq, entry) {
-		if (gc->num == idx)
+		if (sc->hideall)
 			group_show(gc);
 		else
 			group_hide(gc);
 	}
+	sc->hideall = !sc->hideall;
 }
 
 void
@@ -301,20 +315,6 @@ group_prev(struct group_ctx *gc)
 	    newgc : TAILQ_LAST(&sc->groupq, group_q));
 }
 
-void
-group_alltoggle(struct screen_ctx *sc)
-{
-	struct group_ctx	*gc;
-
-	TAILQ_FOREACH(gc, &sc->groupq, entry) {
-		if (sc->hideall)
-			group_show(gc);
-		else
-			group_hide(gc);
-	}
-	sc->hideall = !sc->hideall;
-}
-
 int
 group_restore(struct client_ctx *cc)
 {