Lister: Define view method by file type... (except ExplorerPreview method) dosen't work for HTML files

Please report only one bug per message!

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:

Lister: Define view method by file type... (except ExplorerPreview method) dosen't work for HTML files

Post by *DrShark »

To reproduce:
1. Start Total Commander with clean ini.
2. Open some HTML file in Lister, it will show the file in view 5/HTML (strip tags).
3. Define in Lister any new default view method for *.htm *.html (except ExplplorerPreview):
go to Lister's Options, Configure..., Multimedia, check Define view method by filt type..., press that button and then
Add..., type *.htm *.html, with [+] button add desired view method and then confirm all the changes.
4. Close Lister and reopen the same HTML file with F3:
Lister will still use the 5th view method, HTML (strip tags) as default view.

Only if to define the 8 (ExplorerPreview) as a view method in step 3, it then will be used by default for *.htm, *.html.

Reproduced on Windows 7 32-bit with TC 9.51 final.
Last edited by DrShark on 2020-09-07, 08:13 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Lister: Define view method by filt type... (except ExplorerPreview method) dosen't work for HTML files

Post by *petermad »

2DrShark
It seems that the option "Show HTML as test with links" takes precedence over the option "Define view method by file type".

If "Show HTML as test with links" is disabled you can "Define view method by file type" for *.htm* files.

Hardly a bug, rather maybe just unexpected.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Lister: Define view method by file type... (except ExplorerPreview method) dosen't work for HTML files

Post by *DrShark »

2petermad
HTML (strip view) is a separate view method, such as other 7 view methods, so I think "Define view method by file type" should get a priority no matter what state the "Show HTML as test with links" option has (this option doesn't disable the feature completely, it just defines Lister's behavior at startup). So looks more like a bug to me.
Last edited by DrShark on 2020-09-07, 08:13 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Lister: Define view method by filt type... (except ExplorerPreview method) dosen't work for HTML files

Post by *petermad »

(this option doesn't disable the feature completely, it just defines Lister's behavior at startup
So does all of the options in that dialog.

But, since "Define view method by file type" overrides the 3 options "Use plugins or load bitmap as graphics at startup", "Multimedia (AVI,WAV,...)" and "RTF", then it is only fair that the option "Show HTML as test with links" should also be overridden to be consistent, so I agree that it should be changed - bug or not.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Lister: Define view method by file type... (except ExplorerPreview method) dosen't work for HTML files

Post by *DrShark »

As of TC 10.00 public beta 2, I see following behavior:
  • Case 1: plugin that handles *.htm *.html is not installed:
"Define view method by type..." allows to set any view method for *.htm, *.html or both.
  • Case 2: plugin that handles *.htm *.html by content is installed (I tested with IEWebLister, which BTW I could install only by directly writing a path to its .wlx into [ListerPlugins] section of wincmd.ini, on try to install it by pointing to .wlx from TC's Options->Plugins TC showed an error that plugin dll can't be loaded):
view method set in "Define view method by type..." for *.htm, *.html or both is ignored by Lister on F3, IEWebLister always loaded for both by default.
  • Case 3: plugin that handles *.htm *.html by content, but also the extensions set for it in explicit way in wincmd.ini's [ListerPlugins]:

    Code: Select all

    [ListerPlugins]
    0=c:\totalcmd\plugins\wlx\wlx_ieweblister_1.01\IEWebLister.wlx
    0_detect="EXT="HTML" | EXT="HTM""
    In this case, if NOT to set any kind of view method in "Define view method by type..." for *.htm and *.html (so these extensions arn't even listed under ("Define view method by type..."), Lister by F3 open both *.htm and *.html in Text view (aka view merthod 1), and will only switch to IEWeblister after pressing "4" key.
  • Subcase 3.1. If now to set in the "Define view method by type..." association only for *.htm and to use view method 3 (HEX) for it, there are following results:
    • for *.htm after pressing F3 Lister will use HEX mode (3), after following keypress of "4" key view will switch to method 1 (Text), and next keypress of "4" will switch to IEWebLister.
    • for *.html after pressing F3 Lister will use method 5 HTML (strip tags), following keypress of "4" key will switch to IEWebLister.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply