Command: Regulate CalcFolderSizes setting

RegulateCalcFolderSizes

The RegulateCalcFolderSizes script allows the user to enable the CalcFolderSizes option for a specific tab or source. It does this by reading a tab or source variable and settings the CalcFolderSizes option. As the user switches tabs it enables and disables the feature. The provided button sets the variable and refreshes the file display.

It was originally based on steje's Toggle automatic folder size calculation script:

The two scripts differ in the way that the folder calculation is triggered. The other script does not change the CalcFolderSizes option and instead calls the internal GetSizes command.

Toggle Button:

The provided button sets the variable for the current tab, and refreshes the file display. The button should be placed on the File display toolbar.

The button has an arrow that indicates if CalcFolderSizes is on or not. If the button arrow is green, CalcFolderSizes is on, otherwise it's grey.

Here the button on the source is checked. CalcFolderSizes is enabled and the buttons are green:


Here the button on the source is not checked; however, the button on the destination is. CalcFolderSizes is disabled and the buttons are grey:


The provided button icons are based on these by Cris:

Downloads:

The script, RegulateCalcFolderSizes v1.0:

The .osp file is an Opus Script Package, which includes the script itself as well as the toolbar icons that the button uses. You can rename the .osp file to .zip to look inside it.

Toggle button for File display toolbar:

2 Likes