File and folder labels

Stackable labels

File and folder labels can now “stack” on top of each other. This means that it’s now possible to apply multiple labels to one file, or have multiple wildcard labels that may match a single file. Instead of just the first matching label being used, Opus will continue to search for other matching labels and apply those label settings on top of the previous ones.

 

For example, you could have one label that colors the names of all JPEG files green, and another that bolds the filenames of all images that are 1920x1080 pixels or larger. In Opus 11 only one of these labels could ever be effective at once, but in Opus 12 any 1920x1080 JPEG files would have their filenames shown as bolded green.

 

Each label definition now has a “stop on match” flag which lets you prevent this behaviour on a per-label basis.

 

By default explicitly applied labels override wildcard labels, but the new Preferences setting Favorites and Recent / Labels / Apply wildcard and label filters to explicitly labeled files and folder lets wildcard labels stack on top of explicitly-assigned ones.

 

Adjustable priority

Filter and wildcard label assignments can now be rearranged to control their priority. The new Label Assignments page in Preferences has up and down buttons that let you move label assignments above or below each other.

 

Categories

Labels can now optionally be arranged into categories. These are used to group the labels on the Favorites and Recent / Labels page in Preferences, and can optionally group them in toolbars when displaying generated lists of labels (e.g. the list generated by the Properties SETLABEL !menu command).

 

Status icons and the status column

In addition to text color and style, and icon and icon color, labels can now also specify a “status icon”. This is an additional icon that, instead of overriding the regular file icon, is displayed separately (in the new Status column). Because labels are now stackable, this means you can apply multiple status icons to the one file.

Three status labels are created by default (shown above). To clarify, these are no different to any other label – they just happen to only define a status icon, and have been placed in the Status category. They could just as easily also turn on the bold style or color the file icon.

 

The default Properties drop-down (shown above) uses the new label category functionality to display two separate sub-menus; one (Status) for labels in the “Status” category, and another (Set Label) for everything else.

 

You can see in this example that one file has been assigned the “Flagged” label, and another has been assigned both “Flagged” and “Important”. The Status column has been added to the list and displays the assigned status icons.

 

TortoiseSVN status

For developers using the free TortoiseSVN source code control utility, Opus can optionally display a file’s SVN status as an icon in the Status column. This is controlled by the Folders / Folder Display / Show TortoiseSVN status icons in the Status column option in Preferences. If turned on, Opus will automatically add the appropriate SVN status icon to any other label icons displayed in the Status column.

Other than the status icon appearing larger and more distinctive than the usual icon overlay that Tortoise uses, this can help with the problem of limited icon overlays. Windows only allows a maximum of 15 icon overlays in the system, and Tortoise normally uses 8 or more of these for itself, crowding out other shell extensions. Using this option in Opus gets around the limit as the status is taken directly from Tortoise rather than via the icon overlay.

 

In Preferences there’s also an option to disable the Tortoise icon overlay handler in Opus completely (as shown above – no point showing the same status icon twice), and an option to choose the SVN status icon set.

Note that this feature requires TortoiseSVN version 1.9.3 or greater.

 

Commands

The Properties SETLABEL command can now apply more than one label to a file at once, by comma-separating the label names - for example, Properties SETLABEL red,green. The keyword stoponmatch can be added to override the Apply wildcard and label filters to explicitly labeled files and folders Preferences option, to stop a file inheriting from wildcard and filter labels.

 

The Properties SETLABELTOGGLE argument now accepts the optional keyword shift - if specified, the labels will only be toggled if the Shift key is held down (e.g. Properties SETLABEL red SETLABELTOGGLE shift).

 

The new Properties ADDLABEL argument lets you add a label to a file without replacing any existing labels it might have. If the optional keyword ctrl is specified, the label will only be added if the Control key is held down (e.g. Properties SETLABEL green ADDLABEL ctrl). ADDLABEL also works in conjunction with SETLABELTOGGLE, to toggle a label on and off without affecting any others the file may have.

 

The Properties SETLABEL !submenu command can be used to generate a list or menu of labels grouped into categories – this can also be combined with the !menu keyword. You can also combine the ADDLABEL and SETLABETOGGLE to dynamically generate a list of “toggle label” commands (e.g. Properties SETLABEL !menu !submenu ADDLABEL SETLABELTOGGLE).

 

The new Properties LABELCATEGORY argument can be used to filter the generated list of labels by category. It accepts one or more wildcard strings which let you match the name of categories to include. E.g. to display a list of labels in the Status category, the default drop-down uses the command:

Properties SETLABEL !menu LABELCATEGORY raw:Status ADDLABEL SETLABELTOGGLE

 

The specified categories will also be used when resetting labels using the Properties SETLABEL !reset command - if LABELCATEGORY is used as well, only labels in the specified categories will be cleared. This lets you have a command that, for example, clears all Status category labels (removes all status icons) without affecting any other labels the file may have.