aboutsummaryrefslogtreecommitdiffstats
path: root/group.c
diff options
context:
space:
mode:
authorokan2019-03-07 12:54:21 +0000
committerokan2019-03-07 12:54:21 +0000
commit3ac2ad35ec0bf84d329aff3ee68fd551d4e14fc9 (patch)
tree48c7480d23f7b3f7401e82845d7c701b187dd504 /group.c
parent8d725d1cf917b4ce0bea540b9d029ff067a01afd (diff)
downloadcwm-3ac2ad35ec0bf84d329aff3ee68fd551d4e14fc9.tar.gz
shuffle deck chairs: rename group actions to match intent for clarity
Diffstat (limited to 'group.c')
-rw-r--r--group.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/group.c b/group.c
index 289c294..3419c8b 100644
--- a/group.c
+++ b/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.133 2019/03/01 14:32:01 okan Exp $
+ * $OpenBSD: group.c,v 1.134 2019/03/07 12:54:21 okan Exp $
*/
#include <sys/types.h>
@@ -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)
{