BranchViewExtended wfx-plugin
Moderators: white, Hacker, petermad, Stefan2
You were right, sorry.
I haven't Files|Internal Associations in my custom menu. So I confused with "Associate with..." command.
I have no idea why TC doesn't show internal icons
I'm not sure whether it possible at all
I haven't Files|Internal Associations in my custom menu. So I confused with "Associate with..." command.
I have no idea why TC doesn't show internal icons
I'm not sure whether it possible at all
#213083 Single user license
BranchViewExtended
BranchViewExtended
Here my copy of FsExtractCustomIconW function (I removed some specific to my virtual system blocks):
(I have some special classes - deleted file/folder, script and virtual folder, icon handles for theese classes are in vfile_icon array)
Hope it helps. BTW here you can see how to extract icons from EXE and LNK files (they are extracted when TC calls function from background thread, so don't forget about synchronization).
Code: Select all
int __stdcall FsExtractCustomIconW(WCHAR* RemoteName, int ExtractFlags, HICON* TheIcon) {
int l=lstrlen(RemoteName), result=FS_ICON_USEDEFAULT;
if (l>=4&&!lstrcmp(RemoteName+l-4, L"\\..\\")) return result;
...
if (<virtual file can't be found>) return result;
...
bool script=*name=='<', exists=!*name || script || GetFileAttributes(name)!=INVALID_FILE_ATTRIBUTES, has_own_icon=0;
if (!exists) {
bool folder=(fd.Data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)!=0;
*TheIcon=vfile_icon[folder ? fit_FolderRemoved : fit_FileRemoved][ExtractFlags&FS_ICONFLAG_SMALL ? 0 : 1];
if (*TheIcon) lstrcpy(RemoteName, folder ? L".\\?" : L".?");
return *TheIcon ? FS_ICON_EXTRACTED : FS_ICON_USEDEFAULT;
}
if (!script&&l>4) {
if (!strbegini(name+l-4, L".exe") || !strbegini(name+l-4, L".lnk")) has_own_icon=1;
}
if (ExtractFlags&FS_ICONFLAG_BACKGROUND) {
if (script) {
...
if (p&&ExtractFileIcon(p, ExtractFlags&FS_ICONFLAG_SMALL ? 0 : TheIcon, ExtractFlags&FS_ICONFLAG_SMALL ? TheIcon : 0)) return FS_ICON_EXTRACTED_DESTROY;
}
else {
SHFILEINFO sfi;
if (!SHGetFileInfo(name, 0, &sfi, sizeof(sfi), SHGFI_ICON|SHGFI_ADDOVERLAYS|(ExtractFlags&FS_ICONFLAG_SMALL ? SHGFI_SMALLICON : 0))) return FS_ICON_USEDEFAULT;
*TheIcon=sfi.hIcon;
result=FS_ICON_EXTRACTED_DESTROY;
}
}
else if (script || has_own_icon) return FS_ICON_DELAYED;
if (script) {
*TheIcon=vfile_icon[fit_Command][ExtractFlags&FS_ICONFLAG_SMALL ? 0 : 1];
if (TheIcon) { lstrcpy(RemoteName, L".>"); return FS_ICON_EXTRACTED; }
}
else if (!l&&(fd.Data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) {
*TheIcon=vfile_icon[fit_Folder][ExtractFlags&FS_ICONFLAG_SMALL ? 0 : 1];
if (TheIcon) { lstrcpy(RemoteName, L".\\"); return FS_ICON_EXTRACTED; }
}
return result;
}
Hope it helps. BTW here you can see how to extract icons from EXE and LNK files (they are extracted when TC calls function from background thread, so don't forget about synchronization).
version 1.02 released:
http://cid-9a15473c9a985119.office.live.com/self.aspx/!work/BranchViewEx.wfx
Changes:
+ Added temporary file plugin functions
+ Added VERSION_INFO
http://cid-9a15473c9a985119.office.live.com/self.aspx/!work/BranchViewEx.wfx
Changes:
+ Added temporary file plugin functions
+ Added VERSION_INFO
#213083 Single user license
BranchViewExtended
BranchViewExtended
Yes, of course, I wrote more than twice about it in your topic.
Little suggestion - you can compress plugin to ZIP, RAR or 7Z to reduce distributive size, and add to archive self-installation file pluginst.inf like this one:
So when user will enter archive, TC will suggest to install/update plugin.
Little suggestion - you can compress plugin to ZIP, RAR or 7Z to reduce distributive size, and add to archive self-installation file pluginst.inf like this one:
Code: Select all
[plugininstall]
description=BranchViewEx 1.02: Branch view with subfolder sizes (http://www.ghisler.ch/board/viewtopic.php?t=24238)
type=wfx
file=BranchViewEx.wfx
defaultdir=BranchViewEx
Great, now it is possible to view properfies of file(s) and to view/edit files directly from plugin panel.+ Added temporary file plugin functions
Link points to version 1.01 please update.kotlomoy wrote:version 1.02 released:
http://cid-9a15473c9a985119.office.live.com/self.aspx/!work/BranchViewEx.wfx
Changes:
+ Added temporary file plugin functions
+ Added VERSION_INFO
Can you also check that v.1.02 deals with file type .ico properly? It should, but double-checking is good.
File type .ico icons should display as the actual icon graphics.
Icons problem is not solved in version 1.02.sgp wrote:Link points to version 1.01 please update.kotlomoy wrote:version 1.02 released:
http://cid-9a15473c9a985119.office.live.com/self.aspx/!work/BranchViewEx.wfx
Changes:
+ Added temporary file plugin functions
+ Added VERSION_INFO
Can you also check that v.1.02 deals with file type .ico properly? It should, but double-checking is good.
File type .ico icons should display as the actual icon graphics.
.exe and .ico problem will be solved in version 1.03.
The only problem is internal associated icons now
#213083 Single user license
BranchViewExtended
BranchViewExtended
2sqp
Indeed, it's the same link. But now it points to version 1.02.
Version 1.01 moved to here: http://cid-9a15473c9a985119.office.live.com/self.aspx/!work/BranchViewEx%5E_1.01.wfx
Indeed, it's the same link. But now it points to version 1.02.
Version 1.01 moved to here: http://cid-9a15473c9a985119.office.live.com/self.aspx/!work/BranchViewEx%5E_1.01.wfx
#213083 Single user license
BranchViewExtended
BranchViewExtended
My plugin is one 80k file. So "reduce distributive size" is not very actual problem, I think.MVV wrote:Little suggestion - you can compress plugin to ZIP, RAR or 7Z to reduce distributive size, and add to archive self-installation file pluginst.inf like this one:
#213083 Single user license
BranchViewExtended
BranchViewExtended
kotlomoy wrote:2MVV
Does it work for internal icons?
I've added icons for .gid, .bak and .mnu types:MVV wrote:Yes, of course, I wrote more than twice about it in your topic. Smile
Image: http://img710.imageshack.us/img710/21/88006439.png
What I saw (my test dir), left - TC, right - Virtual Panel:
Image: http://img189.imageshack.us/img189/4159/86675854.png
No icons for .gid and .bak, default icons for .mnu
ps. I see no way to extract internal assigned icons via SHFileGetInfo. So how?
#213083 Single user license
BranchViewExtended
BranchViewExtended
I've made a little typo in dll version, sorrysgp wrote:it does not. it points to a copy of 1.01. please update. thanks.kotlomoy wrote:2sqp
Indeed, it's the same link. But now it points to version 1.02.
dll version info says: name=BranchViewExtended file system plugin for Total Commander; product version=1, 0, 1, 0
It's version 1.02 with wrong VERSION_INFO
(version 1.01 doesn't have VERSION_INFO at all)
#213083 Single user license
BranchViewExtended
BranchViewExtended
It works perfectly for me in TC 7.55rc3 (VirtualPanel shows internally associated icons). Look onto the screenshot (I set icons for *.bak *.gid *.mnu using internal associations).
BTW, when I tested it under 7.50pb6, in my VirtualPanel icons for internal associations wasn't right - just as for you. According to history.txt:
BTW, when I tested it under 7.50pb6, in my VirtualPanel icons for internal associations wasn't right - just as for you. According to history.txt:
Code: Select all
20.01.10 Release Total Commander 7.51 beta 1
...
22.12.09 Added: Temp panel plugin: Show icons for internal associations and per file associations if the plugin returns FS_ICON_USEDEFAULT
I can confirm that internally associated icons display OK for me in MVV's virtual panel.kotlomoy wrote: What I saw (my test dir), left - TC, right - Virtual Panel:
Image: http://img189.imageshack.us/img189/4159/86675854.png
No icons for .gid and .bak, default icons for .mnu