Lister plugins don't allow to switch to RTF view

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

Moderators: sheep, Hacker, Stefan2, white

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

Lister plugins don't allow to switch to RTF view

Post by *DrShark »

To reproduce:
1. Create new RTF file, with name e.g. list.rtf, in plain text editor with following content:

Code: Select all

{\rtf1\plain\
line1
line2
line3

}
2. Install sample Lister plugin.
3. Start TC with following content of main ini file:

Code: Select all

[Lister]
RTF=1
[ListerPlugins]
0=c:\totalcmd\Plugins\wlx\listplugsample\listplug.wlx
0_detect="EXT="RTF""
4. Open the file created in step 1 in Lister: it will open the file using a sample plugin (listplug).
5. Press 4 key: Lister will reload file still using plugin view, while expected behavior is to switch to Lister's RichEdit RTF view.

A kind of workaround is to use the detect string:

Code: Select all

0_detect="(FORCE & EXT="RTF" ) | !(EXT="RTF")"
This will allow to open RTFs with Lister's RichEdit view by default and to switch to a plugin which supports RTF with 4 key. The part after ! there is to make plugins like ulister to view RTF after pressing 4 and still work for formats supported by such plugins but not declared in wincmd.ini detectstring.
In case with more than one extension supported by internal RichEdit control, like *.rtf and *.wri, detect string should look like:

Code: Select all

0_detect="((FORCE & EXT="WRI") | !(EXT="WRI")) &  ((FORCE & EXT="RTF") | !(EXT="RTF"))"
Easier workaround is to launch Lister without plugins loaded at Lister's start using Alt+Shift+F3.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
petermad
Power Member
Power Member
Posts: 9895
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Lister plugins don't allow to switch to RTF view

Post by *petermad »

Sorry I can make listplug.wlx work

I "installed" it manually in a fresh ini file as:
[ListerPlugins]
0=c:\totalcmd\Plugins\wlx\listplugsample\listplug.wlx
0_detect="EXT="RTF""

When I press F3 on an .rtf file the file is shown with Listers internal RTF viewer, and if I choose "Options" in the menu "4 Image/Multimedia" is selected as usual. If I press 4 the file is reloaded with the internal RTF viewer if there is no other plugins supporting .rtf installed. I dont see (listplug) in Lister Title bar at any time indicating that listplug is in use.

On my standard 32bit TC wincmd.ini I have the "office" and the "synplus" plugin that both shows .rtf files - and if I here press F3 Lister will first show the file with the internal RTF viewer, and thereafter if I press 4 it will toggle between the office plugin and the synplus plugin, but it will newer revert to internal RTF view.
License #524 (1994)
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (2004) 64bit, 'Everything' 1.4.1.992 (x64)
TC 3.11 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
DrShark
Power Member
Power Member
Posts: 1628
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Lister plugins don't allow to switch to RTF view

Post by *DrShark »

petermad wrote:
2020-01-10, 01:19 UTC
When I press F3 on an .rtf file the file is shown with Listers internal RTF viewer, and if I choose "Options" in the menu "4 Image/Multimedia" is selected as usual. If I press 4 the file is reloaded with the internal RTF viewer if there is no other plugins supporting .rtf installed. I dont see (listplug) in Lister Title bar at any time indicating that listplug is in use.
1) the bug described in start topic is reproducible with other plugins with rtf support, like ulister. I used listplug in reproduce steps because it's very small.
2) compiled version of listplug from linked archive works only in 32-bit, it's designed to be used with *.c and *.cpp files, and may show other files containing mainly lines of text, that's why reproduce step 1 is a creation of specific rtf file which in plain text is just a list of lines.
petermad wrote:
2020-01-10, 01:19 UTC
On my standard 32bit TC wincmd.ini I have the "office" and the "synlus" plugin that both shows .rtf files - and if I here press F3 Lister will first show the file with the internal RTF viewer
I'll try to check it. What office plugin do you have?

Edit:I tried with office.wlx having size 28672 bytes and MD5 checksum 86c6b1110160d283c2044eee121b6ff7, installed both like

Code: Select all

[Lister]
RTF=1
[ListerPlugins]
0="C:\<path_to_plugins>\office.wlx"
and

Code: Select all

[Lister]
RTF=1
[ListerPlugins]
0="C:\<path_to_plugins>\office.wlx"
0_detect="EXT="RTF""
and in both cases Lister uses office plugin at start, with no switch to internal rtf viewer after switch with 4 key. Do you use FORCE operand in detect string of your plugins with RTF support?
BTW, on Alt+Shift+F3 opens file in internal RTF viewer, but doesn't seem to switch on plugin by pressing 4 too, maybe also a bug?
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40058
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister plugins don't allow to switch to RTF view

Post by *ghisler(Author) »

The internal RTF viewer is very basic, so maybe it's better this way (disable it when there is a better alternative)?
Author of Total Commander
http://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1628
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Lister plugins don't allow to switch to RTF view

Post by *DrShark »

ghisler(Author) wrote:
2020-01-10, 09:13 UTC
The internal RTF viewer is very basic, so maybe it's better this way (disable it when there is a better alternative)?
But it's also very quick and may show files differently than e.g. ulister. Also, what about inability to switch to a plugin from internal RTF viewer with 4 key on Alt+Shift+F3 file opening?
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
petermad
Power Member
Power Member
Posts: 9895
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Lister plugins don't allow to switch to RTF view

Post by *petermad »

:I tried with office.wlx having size 28672 bytes and MD5 checksum 86c6b1110160d283c2044eee121b6ff7
That's the same i have.
Do you use FORCE operand in detect string of your plugins with RTF support?
Yes, sorry - I forgot about that.
License #524 (1994)
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (2004) 64bit, 'Everything' 1.4.1.992 (x64)
TC 3.11 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40058
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister plugins don't allow to switch to RTF view

Post by *ghisler(Author) »

OK, no problem, I have added it.
Author of Total Commander
http://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1628
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Lister plugins don't allow to switch to RTF view

Post by *DrShark »

history950.txt wrote:12.01.20 Added: Lister: RTF files: Allow to also switch to internal RTF viewer by pressing '4' in a lister plugin (32/64)
I can confirm in TC 9.50 beta 13 Lister switches with 4 key from plugin to RTF view (checked on Vista 32-bit).
However, if Lister is started by Alt+Shift+F3, it still doesn't allow to switch from RTF view to plugin view with 4 key.
BTW, since with Alt+Shift+F3 multimedia mode should be ignored, and RTF view is a part of multimedia mode, is it OK that RTF view is auto-used on Alt+Shift+F3?
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40058
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister plugins don't allow to switch to RTF view

Post by *ghisler(Author) »

However, if Lister is started by Alt+Shift+F3, it still doesn't allow to switch from RTF view to plugin view with 4 key.
Isn't that the whole point of using Alt+Shift+F3?
Author of Total Commander
http://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1628
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Lister plugins don't allow to switch to RTF view

Post by *DrShark »

ghisler(Author) wrote:
2020-01-16, 11:36 UTC
However, if Lister is started by Alt+Shift+F3, it still doesn't allow to switch from RTF view to plugin view with 4 key.
Isn't that the whole point of using Alt+Shift+F3?
With other file types on Alt+Shift+F3 Lister disables plugins and multimedia only on start, try for example:

Code: Select all

[ListerPlugins]
0="<path>\Imagine.wlx"
0_detect="MULTIMEDIA"
with e.g. PNG file: on Alt+Shift+F3 Lister will open it as text (so no plugins/multimedia used), but after pressing '4' it will use Imagine, and following '4' will switch to internal Lister picture viewer.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
petermad
Power Member
Power Member
Posts: 9895
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Lister plugins don't allow to switch to RTF view

Post by *petermad »

With other file types on Alt+Shift+F3 Lister disables plugins and multimedia only on start
That's what I see too and would also expect for RTF-view.

I think RTF-view should act like a plugin or like GDI+ view in respect to Alt+Shift+F3 and 4, which also means the RTF-view should not be used from start when pressing Alt+Shift+F3 only after pressing 4.
License #524 (1994)
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (2004) 64bit, 'Everything' 1.4.1.992 (x64)
TC 3.11 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
DrShark
Power Member
Power Member
Posts: 1628
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Lister plugins don't allow to switch to RTF view

Post by *DrShark »

history950.txt wrote:20.01.20 Fixed: Couldn't switch to plugins with '4' key when viewing RTF file with Alt+Shift+F3 (32/64)
I can confirm the fix in TC 9.50 RC1 on Vista 32-bit.
DrShark wrote:
2020-01-15, 22:53 UTC
since with Alt+Shift+F3 multimedia mode should be ignored, and RTF view is a part of multimedia mode, is it OK that RTF view is auto-used on Alt+Shift+F3?
and that behavior isn't changed - any reason for it to be intentional?
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right
User avatar
petermad
Power Member
Power Member
Posts: 9895
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Lister plugins don't allow to switch to RTF view

Post by *petermad »

history950.txt wrote:
20.01.20 Fixed: Couldn't switch to plugins with '4' key when viewing RTF file with Alt+Shift+F3 (32/64)
I can confirm the fix in TC 9.50 RC1 on Vista 32-bit.
DrShark wrote: ↑
Wednesday 15-01-2020, 23:53:17
since with Alt+Shift+F3 multimedia mode should be ignored, and RTF view is a part of multimedia mode, is it OK that RTF view is auto-used on Alt+Shift+F3?
and that behavior isn't changed - any reason for it to be intentional?
I agree on both statements.
License #524 (1994)
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (2004) 64bit, 'Everything' 1.4.1.992 (x64)
TC 3.11 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40058
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister plugins don't allow to switch to RTF view

Post by *ghisler(Author) »

and that behavior isn't changed - any reason for it to be intentional?
I don't consider RTF as multimedia, it has its own checkbox in the Lister settings dialog.
Author of Total Commander
http://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 11837
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Lister plugins don't allow to switch to RTF view

Post by *Hacker »

Message from moderator Hacker

Moved five posts to CudaLister (source code viewer).
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply