New WDX field custommatch flag + ContentCustomMatch func
Moderators: Hacker, petermad, Stefan2, white
Re: New WDX field custommatch flag + ContentCustomMatch func
That's great, thank you, even with plugin-defined operation names!
- ghisler(Author)
- Site Admin
- Posts: 50471
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: New WDX field custommatch flag + ContentCustomMatch func
To give you an example of how this is implemented, the new field "tc" -> "partner file with other extension" implements this. For example, if you set this field to CRW and search for *.jpg, you will find all jpg files for which there is a Canon RAW file with the same name in the same directory. It uses the following:
1. Return the following in ContentGetSupportedFieldFlags for this field:
contflags_fieldsearch | contflags_searchpageonly
2. ContentGetSupportedFieldFlags called with index -1 must return all possible values, including the new two values if you have fields returning them
3. ContentGetSupportedOperators returns:
= != =(case) !=(case)
The operators are separated by spaces, to ensure that no one returns operators containing spaces, which isn't supported.
4. ContentFindValueW uses OperationIndex to distinguish between the 4 possible operators. It uses FindFirstFileW to check whether a file with the indicated extension exists.
1. Return the following in ContentGetSupportedFieldFlags for this field:
contflags_fieldsearch | contflags_searchpageonly
2. ContentGetSupportedFieldFlags called with index -1 must return all possible values, including the new two values if you have fields returning them
3. ContentGetSupportedOperators returns:
= != =(case) !=(case)
The operators are separated by spaces, to ensure that no one returns operators containing spaces, which isn't supported.
4. ContentFindValueW uses OperationIndex to distinguish between the 4 possible operators. It uses FindFirstFileW to check whether a file with the indicated extension exists.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com