InternalAssociations - no items overlaping filters.

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

InternalAssociations - no items overlaping filters.

Post by *fenix_productions »

Steps to reproduce:
1. start "find files" tool (Alt+F7)
2. define two filters as:

Code: Select all

first_SearchFor=*.png *.bmp
second_SearchFor=*.jpg *.png
3. launch "Internal Associations",
4. add two associations for these filters:

Code: Select all

[Associations]
Filter1=>first
Filter1_open=**
Filter1_XnView=D:\totalcmd\tools\media\XnView\xnview.exe "%1"
Filter2=>second
Filter2_open=**
Filter2_irfan=D:\totalcmd\tools\media\IrfanView\I_VIEW32.EXE "%1"
5. navigate through OK buttons :)
6. find any *.png file and open RMB context menu or call for cm_ContextMenuInternal.

Only the first item will be shown! When file matches two different filters only the first one is applied what is wrong IMHO.

Notes:
It makes assigning applications harder than expected.

There are two possible ways of defining what should happen with given extension:
- define one extension as rule and choose various applications for it,
- define set of extensions and call one application for it only.

Although first way seems to be more logical, the second one is a lot easier for the most of the software. I.e. XnView handles 400 files formats so it would be better to create few filters (due to filter length limit) for it first instead of browsing through all of file types. First approach is good for rare extensions only (or if you have small number of tools).

P.S. I know we are in RC stage and nothing new should be added but wouldn't it be better to indicate associations somehow (i.e. by implementing tc->IsAssociated field)?
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2fenix_productions
Ghisler has already confirmed to add such a functionality. Maybe it has been forgotten.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Lefteous
Really? Then I missed (or forgot) that :)
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2fenix_productions
Really
Really! Other place, large thread on this topic, page 16, 6th post.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, it hasn't made it into TC 7.5. There are too many problems, like duplicate command names (e.g. "Edit" defined in multiple filters), and also possible speed problems when all filters have to be checked for all files. It needs considerable work, so I had to postpone it to TC 8.
Author of Total Commander
https://www.ghisler.com
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Lefteous
Thanks. I've got it know.

2ghisler(Author)
Thank you for explanation. I hope TC 8 related threads will start to appear soon :)
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
bfu
Junior Member
Junior Member
Posts: 15
Joined: 2009-10-05, 14:17 UTC
Location: Czech Republic

Post by *bfu »

Yes, these "overlapping filters" would be very handy for me too, for example when I have some actions applicable for all files (extensions).

#208434
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Christian, maybe it is time for such feature? :) You can disable it by default and add wincmd.ini parameter to enable it. Let user solve problem with multiple items with same names (one can rename some items for multiple extensions to distinguish them).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The question is how this should be presented to the user - it could be very confusing, especially when getting multiple identically named menu items from different filters.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As I said, this mode should be disabled by default, also user can rename identical labels himself. Anyway it is better than not to have such useful feature at all.
User avatar
white
Power Member
Power Member
Posts: 5812
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

MVV wrote:As I said, this mode should be disabled by default...
Instead of a global mode, maybe it is a good idea to make it configurable per filter or per verb.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Nice idea. I think it should be per-filter feature in order to continue filters processing.
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

I would like this feature to stay as it is: the first matching filter applies. That's fine.
Any change should be only implemented as an option, please.

Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Juergen wrote:Any change should be only implemented as an option, please.
Of course, no one will set new behaviour by default. :wink:


BTW it would be great to have such through filters for user-defined tooltip lines too. :D I'm sure it is easy to implement - just do not break filter searching loop in case of through filters.
Post Reply