summary refs log tree commit diff
path: root/group.c
diff options
context:
space:
mode:
authorokan <okan>2009-06-20 00:55:41 +0000
committerokan <okan>2009-06-20 00:55:41 +0000
commitbcc0f73bb68bab7bff0e0c969b81fe7547caa58a (patch)
tree9375d5da09799b5501da624a20855a96a23f92b0 /group.c
parent58d12134b1679a9172a7131abffc27769780b9c5 (diff)
downloadcwm-bcc0f73bb68bab7bff0e0c969b81fe7547caa58a.tar.gz
cwm-bcc0f73bb68bab7bff0e0c969b81fe7547caa58a.tar.xz
cwm-bcc0f73bb68bab7bff0e0c969b81fe7547caa58a.zip
compact a bit by condensing a few if-else's; from Thomas Pfaff
"go on then" oga@
Diffstat (limited to 'group.c')
-rw-r--r--group.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/group.c b/group.c
index 96f2290..d4d08b5 100644
--- a/group.c
+++ b/group.c
@@ -325,10 +325,7 @@ group_menu(XButtonEvent *e)
 
 	gc = (struct group_ctx *)mi->ctx;
 
-	if (gc->hidden)
-		group_show(gc);
-	else
-		group_hide(gc);
+	(gc->hidden) ? group_show(gc) : group_hide(gc);
 
 cleanup:
 	while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
@@ -349,10 +346,7 @@ group_alltoggle(void)
 			group_hide(&Groups[i]);
 	}
 
-	if (Grouphideall)
-		Grouphideall = 0;
-	else
-		Grouphideall = 1;
+	Grouphideall = (Grouphideall) ? 0 : 1;
 }
 
 void