emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

w32menu.c patch to fix display of menu item help strings


From: David Ponce
Subject: w32menu.c patch to fix display of menu item help strings
Date: Thu, 15 Nov 2001 17:45:46 +0100

Hi All,

I submit you a small patch to w32menu.c (I think the latest CVS
version) to get menu item :help strings displayed in the echo area.

Currently they are not displayed because of a subtle bug in the
function `add_menu_item' which setups the help string into the Windows
menu structure if ((fuFlags & MF_STRING) != 0).

But it appears that the MF_STRING (a Windows API constant defined in
winuser.h) value is 0 because it is a default flag.  So the previous
condition was always false and the help string was never setup :(

To make it work I just declared a new Boolean flag `single_item'
which is true when the current menu item is a single one.  So now the
help string is setup in the Windows menu structure if (single_item)
is true.

I checked the new version (compiled with the mingw gcc compiler shipped
with the cygwin tools) and it seems to work well.  Now I get the help
strings displayed when the mouse is over a menu item :-)

Hope this will help.

Sincerely,
David

P.S.: I am not a very experienced C developer and this is the first
time I hack the Emacs C code!  I hope my patch is not too bad ;)



____________________________________________________________
Faites un voeu et puis Voila ! www.voila.fr
Avec Voila Mail, consultez vos e-mails sur votre mobile Wap. 

Attachment: w32menu.c.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]