Thank you. And if you add "Mixed" you have all FlatView states:
@ifset:FLATVIEW=Off
Set FLATVIEW=Grouped
@ifset:FLATVIEW=Grouped
Set FLATVIEW=Mixed
@ifset:FLATVIEW=Mixed
Set FLATVIEW=MixedNoFolders
@ifset:FLATVIEW=MixedNoFolders
Set FLATVIEW=Off
It looks OK from a quick inspection. Maybe there's something subtly wrong I haven't spotted. Does the one that works do the job you need or do you need it to do something different?
No, I thought the second looks more "logical" than the other but the first works just fine. The second does not work how it should (in my opinion):
@toggle:if Set FLATVIEW=Toggle
@icon:flatviewgrouped,Set FLATVIEW=Grouped
@icon:flatviewmixed,Set FLATVIEW=Mixed
@icon:flatviewmixednofolders,Set FLATVIEW=MixedNoFolders
@if:Set FLATVIEW=Grouped
Set FLATVIEW=On,Mixed
@if:Set FLATVIEW=Mixed
Set FLATVIEW=On,MixedNoFolders
@if:Set FLATVIEW=MixedNoFolders
Set FLATVIEW=On,Grouped
@if:else
Set FLATVIEW=Off
In the second one, if Flatview is off to begin with then there's nothing that will turn it on.
All the @if clauses are testing for various "on" states, and the final "else" clause turns it off. Nothing actually turns it on.
Thank you, now I understand. Then the order should look like:
@toggle:if Set FLATVIEW=Toggle
@icon:flatviewgrouped,Set FLATVIEW=Grouped
@icon:flatviewmixed,Set FLATVIEW=Mixed
@icon:flatviewmixednofolders,Set FLATVIEW=MixedNoFolders
@if:Set FLATVIEW=Off
Set FLATVIEW=On,Grouped
@if:Set FLATVIEW=Grouped
Set FLATVIEW=On,Mixed
@if:Set FLATVIEW=Mixed
Set FLATVIEW=On,MixedNoFolders
@if:Set FLATVIEW=MixedNoFolders
Set FLATVIEW=Off