https://bugs.winehq.org/show_bug.cgi?id=35312
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to François Gouget from comment #1)
I'd argue that 'Toggle' means 'inverse the current state'. So toggling a switch does not mean turning it on but setting it to the other position, which may either be on or off.
I understand that now, thanks for the explanation.
But then I may agree with you that 'toggle' is not necessarily what we want here. It may make more sense to have something that checks everything if one box was unchecked, and otherwise unchecks everything. I believe that's how gmail's global selection checkbox works for instance.
Yes, that would be nice.
Finally, regarding the proposed code I don't think using a global variable is a good idea. Fortunately it should not be needed.
Hehe, just a hack to "solve" the original problem.