Lister -- how exactly does it determine which plugin to use?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
d125q
Junior Member
Junior Member
Posts: 14
Joined: 2014-06-13, 11:59 UTC

Lister -- how exactly does it determine which plugin to use?

Post by *d125q »

Hello,

How exactly does Lister determine which plugin to use when viewing a certain file?

My list is the following (64-bit TC 8.51a):
  • 1. [face=courier]slister.wlx64 : MULTIMEDIA & (EXT="PDF" | EXT="DJVU" | EXT="DJV"| EXT="XPS" | EXT="CBZ" | EXT="CBR")[/face]
    2. [face=courier]highlight.wlx[/face]
    3. [face=courier]fileinfo.wlx[/face]
    4. [face=courier]ICLView.wlx : MULTIMEDIA & (ext="DLL" | ext="EXE" | ext="ICL" | ext="ICL32" | ext="ICO" | size=0 | force)[/face]
    5. [face=courier]ulister.wlx64 : FORCE | (EXT="XLS" | EXT="XLSX" | EXT="ODS" | EXT="DOC" | EXT="DOCX" | EXT="ODT" | EXT="PPT" | EXT="PPTX" | EXT="ODP")[/face]
    6. [face=courier]Total7zip.wcx[/face]
    7. [face=courier]TCTorrent.wlx64 : EXT="TORRENT"[/face]
Everything works as I want to, except for one thing.

Assume I have the quick view panel (CTRL+Q) opened. Now, I position the cursor on an archive file. This archive file is handled by [face=courier]Total7zip.wcx[/face], just as it should be. Now, if I were to move the cursor directly to a DOCX file, [face=courier]Total7zip.wcx[/face] would again be used instead of [face=courier]ulister.wlx64[/face], even though [face=courier]ulister.wlx64[/face] appears earlier in the list. If I move to a different file and come back to the DOCX, [face=courier]ulister.wlx64[/face] will be used (as I expect it to).

If I came to the DOCX from a different file (not an archive), or opened the quick view panel while having the DOCX under the cursor, everything will work well.

F3 will always [face=courier]ulister.wlx64[/face] first, too.

Can anyone explain to me why this happens?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Quick view tries to reuse last plugin or view mode, e.g. if you switch to HEX view or to specific plugin. That's why it applies Total7zip.wcx to DOCX file which is a ZIP archive. But after switching to non-archive file TC stops using this plugin because it can't handle that file.
User avatar
d125q
Junior Member
Junior Member
Posts: 14
Joined: 2014-06-13, 11:59 UTC

Post by *d125q »

I thought as much. Thanks a lot! I fixed this behavior by adding [face=courier](EXT!="XLSX" & EXT!="DOCX" & EXT!="PPTX") | FORCE[/face] to [face=courier]Total7zip.wcx[/face].

Can you think of anything bad that might happen with this detect string? Now I can force it to be used in a separate Lister window (F3), but it is never used in the quick view panel.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think it should be OK, anyway, you can always fix it if something go wrong.
Post Reply