BranchViewExtended wfx-plugin

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

Moderators: white, Hacker, petermad, Stefan2

User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

#213083 Single user license
BranchViewExtended
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author) wrote:If all the icons are identical, or many of them, you need to tell TC about it!

From the description of FsExtractCustomIcon():

RemoteName
This is the full path to the file or directory whose icon is to be retrieved. When extracting an icon, you can return an icon name here - this ensures that the icon is only cached once in the calling program.
Thanks for the hint! This is important note. BTW, I think you should make this note bold in help file to attract attention. :)
I've added one line of code before return folder icon, and TC uses 256 handles instead of 8k+ in winsxs folder!

Code: Select all

*(int*)RemoteName='\\.';
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

kotlomoy
Do you put plug to totalcmd.net?
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

Alextp wrote:kotlomoy
Do you put plug to totalcmd.net?
No, not sure how to do it :roll:
#213083 Single user license
BranchViewExtended
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

I find this plugin very useful, thank you. Two requests, if possible:
1) when plugin is assigned to toolbar button, make toobar button show 'pressed' when enhanced branch view is active, and 'unpressed' when normal view is active. Look at the way the standard branch view toolbar button looks 'pressed' when branch view is active
2) extract icons from internal associations also. If you define an internal association with its own icon, standard branch view shows the defined icon, but enhanced branch view does not.
Thank you for your consideration.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

1) when plugin is assigned to toolbar button, make toobar button show 'pressed' when enhanced branch view is active, and 'unpressed' when normal view is active. Look at the way the standard branch view toolbar button looks 'pressed' when branch view is active
Sorry but it is impossible since it is not an internal TC feature (TC supports additional button state only for few internal features).
But it is not needed at all because button changes path (so it is an action but not a view mode), and it is impossible to return to original path using same button.
2) extract icons from internal associations also
It is possible, TC supports internal associations for FS plugins. FsExtractCustomIcon should just return FS_ICON_USEDEFAULT for all files except folders.
kotlomoy wrote:
Alextp wrote:kotlomoy
Do you put plug to totalcmd.net?
No, not sure how to do it :roll:
Write an e-mail to Ergo or Flint.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

MVV wrote:and it is impossible to return to original path using same button.
I'm not sure I understand what you mean. Here when I click the button the first time the path changes to \\\BranchViewEx\C:\path\folder with the panel in extended branch view. The second time I click the button the path changes back to C:\path\folder with the panel in standard view.
Basically, it acts like a toggle, just like the standard branch view button.

Anyway, if it's impossible it's impossible. :)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

sgp wrote:I'm not sure I understand what you mean. Here when I click the button the first time the path changes to \\\BranchViewEx\C:\path\folder with the panel in extended branch view. The second time I click the button the path changes back to C:\path\folder with the panel in standard view.
Wow, it's an undocumented feature:) I didn't know that plugin changes current folder back to path if path contains more than one virtual system name.
sgp wrote:Basically, it acts like a toggle, just like the standard branch view button.

Anyway, if it's impossible it's impossible. :)
Unfortunately it is anyway. TC have no interface to control buttonbar buttons.
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

sgp wrote:2) extract icons from internal associations also. If you define an internal association with its own icon, standard branch view shows the defined icon, but enhanced branch view does not.
Please give me some more explanation
#213083 Single user license
BranchViewExtended
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

MVV wrote:It is possible, TC supports internal associations for FS plugins. FsExtractCustomIcon should just return FS_ICON_USEDEFAULT for all files except folders.
This is how BranchViewEx works now (returns FS_ICON_USEDEFAULT)
#213083 Single user license
BranchViewExtended
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

MVV wrote:Wow, it's an undocumented feature:) I didn't know that plugin changes current folder back to path if path contains more than one virtual system name.
I didn't know as well )
[ \ ] button (GoToRoot) works too.
#213083 Single user license
BranchViewExtended
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

kotlomoy wrote:
MVV wrote:It is possible, TC supports internal associations for FS plugins. FsExtractCustomIcon should just return FS_ICON_USEDEFAULT for all files except folders.
This is how BranchViewEx works now (returns FS_ICON_USEDEFAULT)
It is strange why TC shows simple icons. My VirtualPanel returns FS_ICON_USEDEFAULT too but it shows internally associated icons properly. E.g. open my VirtualPanel in left panel and add any file to it, and any folder in your plugin in right panel. Now change icon for any file type that you see in both panels using internal associations feature (I tested with *.txt). In my panel icon will be changed, in your - not.




BTW I think you should report to TC that you have a temporary panel plugin since your plugin really operates with links to local files. And on TC request return physical paths for virtual ones. In this case file operations with files from your plugin's panel won't require extracting file to temp folder. E.g. try to press F3 on any file from your panel - TC will copy file to temp folder and open there, but if your plugin will export FsLinksToLocalFiles and FsGetLocalName functions, TC just will ask you for physical path for this file and open it directly. It won't be hard to realize.
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

MVV wrote:It is strange why TC shows simple icons. My VirtualPanel returns FS_ICON_USEDEFAULT too but it shows internally associated icons properly. E.g. open my VirtualPanel in left panel and add any file to it, and any folder in your plugin in right panel. Now change icon for any file type that you see in both panels using internal associations feature (I tested with *.txt). In my panel icon will be changed, in your - not.
Icon change works fine in my plugin.

My plugin does not extract icons from .exe and .ico files. This is the only difference from standard branch view I noticed.

I'll think about temp panel
#213083 Single user license
BranchViewExtended
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

kotlomoy wrote:Icon change works fine in my plugin.

My plugin does not extract icons from .exe and .ico files. This is the only difference from standard branch view I noticed.
It is strange... For me icon from internal association doesn't work in your plugin. E.g. I open "File\Internal Associations", add *.bak type and choose icon totalcmd.exe,26. Then I create such file, icon is correct. But when I click button to go to your plugin's view of current folder, I see simple unassociated icon (totalcmd.exe,4) instead of expected totalcmd.exe,26 for my .bak file.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

MVV wrote:It is strange... For me icon from internal association doesn't work in your plugin. E.g. I open "File\Internal Associations", add *.bak type and choose icon totalcmd.exe,26. Then I create such file, icon is correct. But when I click button to go to your plugin's view of current folder, I see simple unassociated icon (totalcmd.exe,4) instead of expected totalcmd.exe,26 for my .bak file.
@kotlomoy The same thing happens to me (with other icons and file types). Sorry for not replying earlier, I was away.
Post Reply