Additional parameter for cm_rereadsource

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
AlexandrT
Junior Member
Junior Member
Posts: 29
Joined: 2016-06-19, 20:07 UTC
Location: Russia

Additional parameter for cm_rereadsource

Post by *AlexandrT »

Mr. Ghisler, in version 9.50b9 you added a parameter to the command cm_rereadsource:
11.12.19 Release Total Commander 9.50 beta 9
08.12.19 Added: cm_rereadsource: Parameter 1 forces refresh even if nothing has changed in that directory, e.g. to re-load icons and overlays (32/64)
Please add Parameter "2" which will forces re-apply View Mode to the current panel (source) for reload color scheme.

Based on old another topics:
reReadSource should reload cotentfield and color scheme https://www.ghisler.ch/board/viewtopic.php?t=54841
Improving the behavior of cm_FocusTrg and cm_RereadSource https://www.ghisler.ch/board/viewtopic.php?t=49030

Now with the addition of "Parameter 1" the behavior can be changed.
#231783 Single user license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Additional parameter for cm_rereadsource

Post by *ghisler(Author) »

Thanks for the suggestion, I will check whether this is possible.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Additional parameter for cm_rereadsource

Post by *petermad »

I still has a problem with re-reading of cached ico files.

To reproduce:
1. download https://madsenworld.dk/tcmd/icotest.zip
2. Unpack the content to a test folder for example c:\test
3. Copy the file c:\test\0\test.ico to c:\test
4. Copy the file c:\test\1\test.ico to c:\test and answer yes to overwrite
5. The icon for c:\test\test.ico now looks like the icon for c:\test\1\test.ico
6. Copy the file c:\test\0\test.ico to c:\test and answer yes to overwrite
7. The icon for c:\test\test.ico STILL looks like the icon for c:\test\1\test.ico
8. Execute cm_rereadsource 1 - no change
9. Restart TC - now the icon for c:\test\test.ico looks like the icon for c:\test\0\test.ico as it should.

NOTE: This is under Windows 7.
Under Windows 10 1909 I don't. even have to overwrite c:\test\test.ico twice to see the problem:
4. Copy the file c:\test\1\test.ico to c:\test and answer yes to overwrite
5. The icon for c:\test\test.ico STILL looks like the icon for c:\test\0\test.ico

Would it be possible to have the cm_rereadsource command to also update these kind of cached icons?

NOTE 2: Windows Explorer behaves the same way.
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: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Additional parameter for cm_rereadsource

Post by *ghisler(Author) »

NOTE 2: Windows Explorer behaves the same way.
Hmm, it sounds like a problem with the Windows icon cache then - apparently it's not updated when the icon file changes.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Additional parameter for cm_rereadsource

Post by *petermad »

Hmm, it sounds like a problem with the Windows icon cache then - apparently it's not updated when the icon file changes.
But since at restart of TC fixes the problem, I thought that something could be done, to mimic a restart.
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: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Additional parameter for cm_rereadsource

Post by *ghisler(Author) »

Unfortunately there seems to be no function to clear the cache used by SHGetFileInfo while a process is running. :(
Author of Total Commander
https://www.ghisler.com
AlexandrT
Junior Member
Junior Member
Posts: 29
Joined: 2016-06-19, 20:07 UTC
Location: Russia

Re: Additional parameter for cm_rereadsource

Post by *AlexandrT »

cm_RereadSource with parameter not working from usercmd.ini:

Code: Select all

[em_usercmd1]
button=wcmicons.dll,15
cmd=cm_FocusTrg,cm_RereadSource 2
Total Commander display message:
Function not implemented!
2
If "cm_RereadSource 2" is replaced for example by "cm_100Percent 75" all is good
#231783 Single user license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Additional parameter for cm_rereadsource

Post by *ghisler(Author) »

Thanks, this isn't currently supported - there is a list of commands TC checks here. I will add cm_RereadSource to that list.
Author of Total Commander
https://www.ghisler.com
Post Reply