I've been working on a application that interfaces with Explorer, and
it's been bugging me for awhile that TortoiseSVN overlays would not
appear, whereas TortoiseCVS icons work just fine.
Finally I got out the debugger and investigated the problem, which
eventually took me to this little hack in TortoiseSVN IconOverlay.cpp:
> if(!bAllowOverlayInFileDialogs)
> {
> // Test if we are in Explorer
> TCHAR buf[_MAX_PATH + 1];
> DWORD pathLength = GetModuleFileName(NULL, buf, _MAX_PATH);
> if(pathLength >= 13)
> {
> if ((_tcsicmp(&buf[pathLength-13],
> _T("\\explorer.exe"))) != 0)
> {
> return S_FALSE;
> }
> }
> }
When I renamed the app to "explorer.exe", sure enough the icons magically
appeared. And it turns out there is a GUI checkbox for "Show overlays only
in explorer", which I guess I must have checked at some point.
I felt a little stupid, but I don't think my interpretation was unusual. IMO
there's something fundamentally wrong about equating Explorer.exe with
Windows Explorer, since the "explorer" functionality can be accessed
from many different processes (e.g. from iexplore.exe). I mean, the "e"
isn't even capitalized in that caption. :-)
I would like to suggest that we rename the checkbox to "Show overlays only
for the Explorer.exe process," or at least mention in the tooltip that
dialogs are not the only place where the overlays will be disabled. (Or
an even better approach might be to let the user input a list of process
names.)
It's not a big deal, but maybe it could have saved me those hours I wasted
debugging COM interfaces. ;-D
Cheers,
-Pete
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jan 6 17:46:48 2005