[REQ] FS-plugins: make it possible to update cache

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

[REQ] FS-plugins: make it possible to update cache

Post by *Flint »

There could be a very useful feature in FS-plugins: displaying with the file/folder icon the current state of the item. Examples:
1. Plugin Services, current state of the service: running or stopped. Now it's solved by adding the "Running" and "Stopped" extensions which does not seem to be a beutiful solution. :)
2. Plugin VirtualDisk, current state of the image: mounted/unmounted/unavailable. I wanted to implement it but found that TC caches the icons and does not reread them, and I have no way to make it update the icon. Changing the extension is impossible here by the concept - the name should show the file type; names like Disk.iso.Mounted look ugly.
3. Plugin Device Manager, state of the device: plugged or unplagged (or turned off). Solution is the same to the Services plugin - different extensions.

and so on.

I think, there could be some callback function that the plugin could call to make TC do some action. This approach would allow to do much more things than only updating the icons.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

Yes!! This could be a good feature for the FS interface.
But i think that this means that in each FNC phase one additional call must be made to retrieve the icon.

This could lead to speed lost.

Why not change the the current interface so that the icons are reread instead of caching the icons?
______________________
David Jorge
Personal License #117854
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

djorge
Why not change the the current interface so that the icons are reread instead of caching the icons?
No, this is worse, because usually changing the icon is a rear operation and is performed with only one item per operation. In my examples: starting/stopping the service, mounting/unmounting the image, plugging/unplugging the device - all these operations are performed with one single item.

But there could be some extension for rereading all the icons at once. For example, the callback function that I told about could take a parameter:
TCCallbackFunction(REREAD_ONE_ICON, "\\VirtualDisk\Disk.iso"); - rereads only one icon for the element specified.
TCCallbackFunction(REREAD_ALL_ICONS, NULL); - rereads icons for all the elements of the plugin.

Also there could be some other constants for the operation performed - for example, for notifications about changing the size, file/date, for forced rereading the contents of the plugin and so on.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

No, this is worse, because usually changing the icon is a rear operation
What do you mean by a "rear operation"?
______________________
David Jorge
Personal License #117854
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

djorge
What do you mean by a "rear operation"?
Sorry, "rare" of course. :lol:
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

Let's hear what Ghisler say about this idea.
______________________
David Jorge
Personal License #117854
Post Reply