Context menu icon patch
From: Nathan Moinvaziri <nathan_at_nathanm.com>
Date: Sun, 23 Aug 2009 20:12:15 -0700
Hello TortoiseSVN dev,
I have found a bug and am submitting a patch. The details are below:
There is a bug in the way that the context menu icons are set in Tortoise. The problem manifests itself in Windows 7 and most likely in Windows Vista. It happens when the system has the Classic theme enabled and there are multiple context menus.
Here is a screenshot of the problem:
As you can see there are two columns for icons. This is why the icons are pushed up against the text in the screenshots above.
What happens is that legacy context menus set the icons via MENUITEMINFO's hbmpChecked and hbmpUnchecked property. TortoiseSVN sets it via the new method which uses hbmpItem. So Windows creates one column for a checkbox and another column for the icon in this case. The funny thing is that in the Windows Aero theme, it doesn't have this problem. How the problem is resolved is by setting the style of the menu to MNS_CHECKORBMP via SetMenuInfo. It is my conclusion at the Aero theme actually does this automatically, which is why the problem doesn't exhibit itself in Aero.
Here are screenshots after the patch:
Attached is the patch, menufix.patch which resolves the problem. I look forward to your feedback.
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
This is an archived mail posted to the TortoiseSVN Dev mailing list.