From: Andrew Innes Date: Sat, 11 Jul 1998 21:52:17 +0000 (+0000) Subject: (w32_menu_show): Set widget call_data to 0 if definition is nil. X-Git-Tag: emacs-20.3~342 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e59fe83bff7290cf5543e73752d65c71c1c23a16;p=emacs.git (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. --- diff --git a/src/w32menu.c b/src/w32menu.c index 4263c631bdc..6c793ca87e5 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1721,7 +1721,7 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) 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 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) fuFlags = MF_SEPARATOR; else { - if (wv->enabled) + if (wv->enabled && wv->call_data != 0) fuFlags = MF_STRING; else fuFlags = MF_STRING | MF_GRAYED;