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

BranchViewExtended wfx-plugin

Post by *kotlomoy »

BranchViewExtended is similar to standard Branch View but shows also all nested directories with their sizes.

Version 1.03
Branch View Extended 1.03 x86

Version 1.03 x64
Branch View Extended 1.03 x64


How to use:

You have to create button or start menu item with following parameters:

Command: cd
Parameters: \\\BranchViewEx\%p

Plugin works for current path, like standard Branch View.


Why to use:


I use it when I need to quick-free some disk space. In this case I set sorting method "Sort by size" and run this plugin. With this plugin I can find not only needless huge files but also needless huge directories containing a lot of small files (that is why I can't find them with standard Branch view) and buried deeply in file system (that's why I can't find them manually).


History


version 1.00 - First release

version 1.01
+ Show icons for directories

version 1.02
+ Temp panel plugin functionality
+ VERSION_INFO

version 1.03
+ Show icons for internal associations
+ Show icons for .exe, .lnk and .ico files
+ Plugin autoinstallation
Last edited by kotlomoy on 2013-04-14, 14:25 UTC, edited 12 times in total.
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

I've written this plugin for myself. It is first working version. It is untested and not very friendly. But it works for me fine.

Notes:
-- You cannot browse directories from this plugin.
-- You cannot start plugin directly from My Network Places.
-- This plugin shows directories as files with ./ extension (If you use color scheme for directories I recommend use this scheme for ./ files too).
-- This plugin doesn't follow symbolic links but shows them as directories (by the way you can browse them manually).
-- This plugin uses standard copying progress dialog to indicate progress.
#213083 Single user license
BranchViewExtended
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Description shouldn't use "like Batch View" ... For anyone that doesn't use Batch View this entirely limits understanding what your plugin is meant to accomplish.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

kotlomoy,
Hm, Batch View? Branch View perhaps? Or am I missing something?

Roman
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.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Maybe. I thought it was referencing a plugin "Batch View"
Like DiskDir & DiskDirEx(tended) or others.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

Hacker wrote:kotlomoy,
Hm, Batch View? Branch View perhaps? Or am I missing something?

Roman
Yes, Branch View. :) I don't know why I copied BatchView everywhere :oops:
#213083 Single user license
BranchViewExtended
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2kotlomoy

Download, install, create toolbar button, click on the toolbar button but nothing happen.

I also tryed cd \\\BranchViewEx\%p from command line but didn't work too.

TC 7.50a/ Windows 7
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

kotlomoy wrote:(If you use color scheme for directories I recommend use this scheme for ./ files too)
I suggest to return special folder icon instead of default icon. This will help to distinguish folders and files.
ts4242 wrote:I also tryed cd \\\BranchViewEx\%p from command line but didn't work too.
For me "cd \\\BatchViewEx\D:\Programs" works fine. You should specify correct plugin name that you see in Network Neighbor.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

MVV wrote:You should specify correct plugin name that you see in Network Neighbor.
Thanks!
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

MVV wrote: I suggest to return special folder icon instead of default icon. This will help to distinguish folders and files.
Not applicable to ./ files though
ts4242 wrote:For me "cd \\\BatchViewEx\D:\Programs" works fine. You should specify correct plugin name that you see in Network Neighbor.
Thanks for notice. Fixed now.

cd \\\BranchViewEx\%p

should work fine now
#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: I suggest to return special folder icon instead of default icon. This will help to distinguish folders and files.
Not applicable to ./ files though
I mean that you should return folder icon handle in function FsExtractCustomIcon when TC asks you an icon for files with ./ extension.
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

MVV wrote:I mean that you should return folder icon handle in function FsExtractCustomIcon when TC asks you an icon for files with ./ extension.
Oh, I see. May be I'll try this, thanks
#213083 Single user license
BranchViewExtended
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

MVV wrote:I mean that you should return folder icon handle in function FsExtractCustomIcon when TC asks you an icon for files with ./ extension.
I made what you suggested:
cid-9a15473c9a985119.skydrive.live.com/self.aspx/!work/BranchViewEx%5E_Icons%5E5nonstable!%5E6.wfx

BUT:

-- When there is a LOT of directories (thousands) TC doesn't draw all my icons. More importantly that TC itself gets problems with redrawing of windows, buttons, menu... :?

-- Now it takes more time to scan.
#213083 Single user license
BranchViewExtended
User avatar
kotlomoy
Member
Member
Posts: 100
Joined: 2008-03-09, 07:27 UTC

Post by *kotlomoy »

-- When there is a LOT of directories (thousands) TC doesn't draw all my icons. More importantly that TC itself gets problems with redrawing of windows, buttons, menu... Confused
This are changes I made:

Code: Select all

HINSTANCE theDll = NULL;
BOOL APIENTRY DllMain( HINSTANCE hModule,
					  DWORD ul_reason_for_call,
					  LPVOID lpReserved
					  )
{
	theDll = hModule;
	return TRUE;
} 

int __stdcall FsExtractCustomIcon(char* RemoteName,int ExtractFlags,HICON* TheIcon)
{
	if ('/' == RemoteName[ strlen( RemoteName ) - 1 ])
	{
		if(ExtractFlags&FS_ICONFLAG_SMALL)
			*TheIcon=(HICON)LoadImage(theDll,MAKEINTRESOURCE(IDI_ICON_FOLDER16),IMAGE_ICON,16,16,0);
		else
			*TheIcon=(HICON)LoadImage(theDll,MAKEINTRESOURCE(IDI_ICON_FOLDER32),IMAGE_ICON,32,32,0);

		return FS_ICON_EXTRACTED;
	}
	return FS_ICON_USEDEFAULT;
}
Can anybody find an error in this code? :roll:
#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 »

You should extract icon during loading plugin and to keep its handle in memory, e.g. in DllMain. Later, when TC will ask you for icon, you just return its handle with flag FS_ICON_EXTRACTED. So, you don't need to spend some time to extract icon every time you need it. And there will be no difference in scan time.

BTW, if you call LoadImage every time in FsExtractCustomIcon, you must use FS_ICON_EXTRACTED_DESTROY flag to tell TC that icon should be destroyed after using. If you just return FS_ICON_EXTRACTED, your plugin creates extra system graphics object in each FsExtractCustomIcon call - I think this may cause troubles with drawing, especially if your function is being called many times.
Post Reply