I'm having a problem with the Hide Folder Filter and show file filter persisting to all my default folders. This only occurs after I run the following code:
@if:Set SHOWFILTERFILENAME=grp:Videos
Set FORMAT "zz[temp]"
Set FLATVIEW=off
@if:else
Set SAVEFORMAT=favorite FORMAT "zz[temp]"
Set SHOWFILTERFILENAME=grp:Videos
Set HIDEFILTERFOLDERS=*
Set FLATVIEW={$glob!:VOFlatView}
Select SIZE {$glob!:VOIgnoreSmallFiles} DESELECTNOMATCH HIDESEL
@toggle:if Set SHOWFILTERFILENAME=grp:Videos
I also have a settings button that's used in conjunction with this:
@set glob!:VOFlatView={dlgchoose|Enable Flatview?|Yes=on,MixedNoFolders+No=off}
@set glob!:VOIgnoreSmallFiles={dlgchoose|Ignore Small Files?|Yes=<30mb+No=<0mb}
Using the default settings for my button, I click on it and it does it's thing. Once complete, let's say I move to another folder. The following appears to be getting applied to every folder that uses the default format:
"grp:Videos" under Show filters file names
"*" under the hide filter folder names
It's not permanent. It only affects that tab and it goes away if I close and re-open the Lister. I also found that if I go into the folder options and remove the above filters, it removes it from all the folders even without saving the folder format. It does not affect any folder with a format I have made, only folders that use the user default format. I checked the user default format in the preferences and it did not appear to have the above filters.
In addition, if I re-apply the zz[temp] temp format like my button code does when it is turning off, it fixes the issue.
Run set format=!folder when you want to undo any temporary changes to the current format, and revert back to the one you'd get if you opened the current folder in a brand new tab.
Thanks Leo! That mostly fixed the issue! The last little bit is that for some reason the button is still appearing highlighted after I toggle it on and then off again.
This is the toggle condition:
@toggle:if Set SHOWFILTERFILENAME=grp:Videos
It should only appear highlighted when the above condition is met yet even when I click it the 2nd time to turn it off and include the command you provided, it still appears highlighted. I tried adding another @toggle command but it did not do anything nor did changing the place in the code of the @toggle line. It's not mentioned in the reference as far as I can see but does this mean only one @toggle command can be used and it's position doesn't matter?
I had to simplify the button as I don't have the same formats set up, but this seems to toggle fine:
@if:Set SHOWFILTERFILENAME=grp:Videos
Set FORMAT=!folder
@if:else
Set SHOWFILTERFILENAME=grp:Videos
@toggle:if Set SHOWFILTERFILENAME=grp:Videos
However, I would move the @toggle line to the top, since it's in an @if:else statement in the original version, which may mean it's filtered out half the time (depending on the order things get processed; best not to depend on that at all).
@toggle:if Set SHOWFILTERFILENAME=grp:Videos
@if:Set SHOWFILTERFILENAME=grp:Videos
Set FORMAT=!folder
@if:else
Set SHOWFILTERFILENAME=grp:Videos
Also I should add, for some reason the * in the hide folder filter doesn't seem to be hiding any folders. It hides folders when I add it manually but not when done through the button. Here is the latest code (all defaults were used when experiencing issues. Defaults are listed in the code below):
@toggle:if Set SHOWFILTERFILENAME=grp:Videos
// Checking if configured. If not, defaults are loaded.
@if:!$glob!:VOFlatView
@set glob!:VOFlatView=on,mixed
@if:else
@if:!glob!:VOIgnoreSmallFiles
@set glob!:VOIgnoreSmallFiles=<30mb
@if:else
@if:!glob!:VOHideFolders
@set glob!:VOHideFolders=*
@if:else
// Turing button off
@if:Set SHOWFILTERFILENAME=grp:videos
Set FORMAT=!folder
Set FLATVIEW=off
// Turing button on
@if:else
Set SHOWFILTERFILENAME=grp:videos
Set HIDEFILTERFOLDERS={$glob!:VOHideFolders}
Set FLATVIEW={$glob!:VOFlatView}
Select SIZE {$glob!:VOIgnoreSmallFiles} DESELECTNOMATCH HIDESEL
I found the solution to both the issues I was having.
Apparently if you apply hide/show filters before going into flatview, those filters are preserved and re-applied when exiting flatview. In other words, I had to switch up the code so that Flat View was applied first and then the hide/show filters. In addition, I made sure to clear folder settings(Set FORMAT=!folder) after flatview was exited.
The 2nd issue I was having, where * was not hiding all folders, was also caused by flatview. I do not know why but it seems flatview ignores hidefolderfilter. I had to instead apply a flatview mode that has folders off by default. For when flatview is off, the button will instead use * and hides all folders as it should.
You can change that via Preferences / Miscellaneous / Advanced: [Behavior] flatview_folder_filters (there's also a checkbox when the Filter Bar is active).
It's off by default because what it does confuses a lot of people. If a folder is filtered out of Flat View then the folder and everything below it is excluded.
Ah, it definitely makes sense now why you guys would set it up like that. That would confuse me as well unless I knew about it. I definitely don't want to filter out everything below the folder as well.