(add_menu_item): Gray menu entry if widget call_data is 0.
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;
fuFlags = MF_SEPARATOR;
else
{
- if (wv->enabled)
+ if (wv->enabled && wv->call_data != 0)
fuFlags = MF_STRING;
else
fuFlags = MF_STRING | MF_GRAYED;