--On Sunday, May 09, 2004 12:19:29 +0000 Mikhael Goikhman <[EMAIL PROTECTED]> wrote: > I think you misuse the intended condition syntax. As I said, you just > want a new IsEmpty or maybe IsTrue condition, i.e.: > > Test (IsTrue "$0") happens conditionally >
Hmm, okay, I can live with that :) how about this: $ cvs diff conditional.c Index: conditional.c =================================================================== RCS file: /home/cvs/fvwm/fvwm/fvwm/conditional.c,v retrieving revision 1.92 diff -u -w -r1.92 conditional.c --- conditional.c 2 Apr 2004 12:09:33 -0000 1.92 +++ conditional.c 9 May 2004 12:59:26 -0000 @@ -1608,9 +1608,39 @@ on = 0; cond++; } - if (StrEquals(cond, "True")) + if (StrEquals(cond, "IsTrue")) { - match = True; + char *pattern; + int option; + + tmp = GetNextSimpleOption(tmp, &pattern); + + if (pattern) + { + option = ParseToggleArgument(pattern, NULL, -1, 0); + + switch (option) + { + case -1: + error = True; + break; + case 0: + match = False; + break; + case 1: + /* No action required */ + break; + default: + break; + } + + free(pattern); + } + else + { + error = True; + } + } else if (StrEquals(cond, "Version")) { -- ------------------------------------- [EMAIL PROTECTED] | finger me for my gpg key. -------------------------------------------------------
pgpImunsxnnRK.pgp
Description: PGP signature