[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Context menu icon patch

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 24 Aug 2009 08:29:01 +0200

On 24.08.2009 05:12, Nathan Moinvaziri wrote:
> 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:
>
> beforefix2.png beforefix.png
>
> 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:
>
> afterfix2.png afterfix.png
>
> Attached is the patch, menufix.patch which resolves the problem. I look
> forward to your feedback.

Thanks a lot for your patch!
Committed in r16987.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2386646
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-08-24 08:29:28 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.