changeset 22737:41e01b5de7cc

(w32_menu_show): Set widget call_data to 0 if definition is nil. (add_menu_item): Gray menu entry if widget call_data is 0.
author Andrew Innes <andrewi@gnu.org>
date Sat, 11 Jul 1998 21:52:17 +0000
parents a5015b8f1003
children d35510185a2d
files src/w32menu.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32menu.c	Sat Jul 11 20:42:12 1998 +0000
+++ b/src/w32menu.c	Sat Jul 11 21:52:17 1998 +0000
@@ -1721,7 +1721,7 @@
 	  wv->value = 0;
 	  /* Use the contents index as call_data, since we are
              restricted to 16-bits..  */
-	  wv->call_data = (void *) (EMACS_INT) i;
+	  wv->call_data = !NILP (def) ? (void *) (EMACS_INT) i : 0;
 	  wv->enabled = !NILP (enable);
 	  prev_wv = wv;
 
@@ -2047,7 +2047,7 @@
     fuFlags = MF_SEPARATOR;
   else 
     {
-      if (wv->enabled)
+      if (wv->enabled && wv->call_data != 0)
 	fuFlags = MF_STRING;
       else
 	fuFlags = MF_STRING | MF_GRAYED;