QuickView doesn't respect higher priority of associated plugin

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

QuickView doesn't respect higher priority of associated plugin

Post by *DrShark »

For me this issue is reproduced with 2 plugins installed: 1st with higher priority is associated with some extensions, 2nd with lower priority doesn't have associations defined in wincmd.ini, but is able to handle file types associated with 1st plugin. In below reproduce steps I'll use plugins I have installed:
1. Install lister plugins like that:

Code: Select all

[ListerPlugins]
0=c:\totalcmd\Plugins\wlx\CudaLister\cudalister.wlx
0_detect="EXT="MD" | EXT="TS""
1=%COMMANDER_PATH%\Plugins\wlx\ulister\ulister.wlx
2. In some folder, place *.ts and *.js files.
3. Open .ts file using Ctrl+Q: QuickView will open it in CudaLister plugin, which has higher priority for this file type.
4. Move file cursor using up/down keys or mouse to .js file: QuickView will use ulister plugin to show it.
5. Move cursor back to .ts file: QuickView will still use ulister which has lower priority.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
petermad
Power Member
Power Member
Posts: 14793
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: QuickView doesn't respect higher priority of associated plugin

Post by *petermad »

I cannot find where, but I am sure Ghisler has said that this beheaviour is on purpose. It is not a matter of priority, but it is that the currently used plugin is used when changing to a new file, if that filetype is supported by the current plugin.

The idea is that you can press Ctrl+Q on a file, then click on the Quick View panel and press 4 to switch to the another plugin that can show the file, and thereafter this plugin will be used for the next files, as long as the filetype is supported by that plugin.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: QuickView doesn't respect higher priority of associated plugin

Post by *ghisler(Author) »

That's exactly the reason! The filters are only used when
1. Opening the lister or quick view
2. Switching from one of the other modes to '4'
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: QuickView doesn't respect higher priority of associated plugin

Post by *DrShark »

I knew similar thing happens with QuickView behavior for text view e.g. in case it can't detect ANSI or ASCII encoding, Christian Ghisler described this in email reply to one of my reports about difference of Lister and QuickView behavior:
Christian Ghisler wrote:[... if QuickView] cannot distinguish between manual OEM mode (the user has set it) and auto-detect OEM mode [...] when you switch to the next file and [QuickView] is in OEM mode, it will remain in OEM mode because it assumes that the user wants to view files in OEM mode.
I didn't expect similar behavior in QuickView exists for plugins too...

I suggest to introduce new cm_<somename> command with parameter to control QuickView behavior, and suggest at least following values for parameter:
0 - current QuickView behavior, it will decide what mode to use for text and what plugins to use in Multimedia mode.
1 - Use Lister behavior to decide what mode to use for text, but QuickView method for using plugins.
2 - Use QuickView behavior to decide what mode to use for text, but Lister method for using plugins.
3 - always use Lister's method to decide what mode to use for text and what plugins to use in Multimedia mode.

I'm talking not only about wincmd.ini parameter, but about cm_ command because QuickView is used to view many files quickly, and user may have a need to change QuickView method of work quicky without TC restart.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply