[REQ] Win32-type tooltips should only show nonempty strings

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
theosdikaios
Senior Member
Senior Member
Posts: 228
Joined: 2006-02-04, 13:02 UTC

[REQ] Win32-type tooltips should only show nonempty strings

Post by *theosdikaios »

Use tooltips generated by content plugins
Use a short description for this data e.g. Comment: for jpeg comments
then an useless tooltip is generated if the pic has no comment
e.g. Comment: <nothing>.
In this case an option would be fine to avoid this useless line.

Here the wincmd.ini entries for testing:

Code: Select all

[ContentPlugins]
0=%COMMANDER_PATH%\PLUGINS\WDX\JPG\jpg-comment.wdx
0_detect="ext="JPG"|ext="JPEG""
[HintsCustomField]
0exts=*.jpg *.jpeg
0fields=Comment: [=jpg-comment.JPG Comment]
Another observation on detect string: only uppercase file extensions work fine.
e.g.
works fine: 0_detect="ext="JPG"|ext="JPEG""
doesn't work: 0_detect="ext="jpg"|ext="jpeg""
It would be fine if both variants work.
"Since there are many things which have never happened and never will happen,
and which nevertheless are clearly conceivable, and imply no contradiction,
how can one say they are absolutely impossible?" Leibniz
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

2theosdikaios
1. Very basic request, but anyhow it is supported.
2. If you won't include string "Comment: " in the tooltip, empty string will not be shown in your case. It is always so if a string is the first in a tooltip.
3. Detect_strings are not thought to be changed by the user. In wdx-ARI it is said that the extensions MUST be uppercase. Moreover, in API the word "ext" is always written in uppercase too.
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
theosdikaios
Senior Member
Senior Member
Posts: 228
Joined: 2006-02-04, 13:02 UTC

Post by *theosdikaios »

2. If you won't include string "Comment: " in the tooltip, empty string will not be shown in your case.
My example is simple but imagine to use a lot of exif plugin data. In this case a short description like Comment: is needed and to see all empty (unused) tags is not helpful.
"Since there are many things which have never happened and never will happen,
and which nevertheless are clearly conceivable, and imply no contradiction,
how can one say they are absolutely impossible?" Leibniz
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

Support++
9kvD38n6
Junior Member
Junior Member
Posts: 89
Joined: 2010-09-03, 08:23 UTC

Post by *9kvD38n6 »

Support++

Please, could we have this very useful feature?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2. If you won't include string "Comment: " in the tooltip, empty string will not be shown in your case.
Try this:

0fields=[="Comment: "jpg-comment.JPG Comment]

This is a conditional text. But it will work only if the plugin returns ft_fieldempty or ft_nosuchfield.
Author of Total Commander
https://www.ghisler.com
9kvD38n6
Junior Member
Junior Member
Posts: 89
Joined: 2010-09-03, 08:23 UTC

Post by *9kvD38n6 »

Hidden feature?

Works great, e.g. with ShellDetails and FileDiz, but not, for example, with XPDFSearch.

Many thanks!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hidden feature?
No, it's documented in the help.
Works great, e.g. with ShellDetails and FileDiz, but not, for example, with XPDFSearch.
That really depends on the plugin writer - returning ft_fieldempty vs. ft_string with an empty string.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author),
Is "\n" supported in prefix and suffix? Doesn't work for me.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No it isn't, because the height would become unpredictable. This would be a big problem especially when using content plugins in thumbnails view.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Why do you need to know exact height?
And why can't you get it after building tooltip text?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Why do you need to know exact height?
For the height of the thumbnails (in thumbnails view).
And why can't you get it after building tooltip text?
Because I would have to get all the plugin data before showing the directory.
Author of Total Commander
https://www.ghisler.com
Post Reply