{
wv->name = string_chars;
wv->enabled = 1;
+ /* dverna Dec. 98: command_builder_operate_menu_accelerator will
+ manipulate the accel as a Lisp_Object if the widget has a name.
+ Since simple labels have a name, but no accel, we *must* set it
+ to nil */
+ wv->accel = LISP_TO_VOID (Qnil);
}
}
else if (VECTORP (desc))
{
- if (!button_item_to_widget_value (desc, wv, 1,
+ Lisp_Object gui_item = gui_parse_item_keywords (desc);
+ if (!button_item_to_widget_value (gui_item, wv, 1,
(menu_type == MENUBAR_TYPE
&& depth <= 1)))
{
wv->enabled = 1;
wv->name = (char *) XSTRING_DATA (LISP_GETTEXT (XCAR (desc)));
- accel = menu_name_to_accelerator (wv->name);
+ accel = gui_name_accelerator (LISP_GETTEXT (XCAR (desc)));
wv->accel = LISP_TO_VOID (accel);
desc = Fcdr (desc);
wv = xmalloc_widget_value ();
wv->type = CASCADE_TYPE;
wv->next = NULL;
+ wv->accel = LISP_TO_VOID (Qnil);
wv->contents = xmalloc_widget_value ();
wv->contents->type = TEXT_TYPE;
wv->contents->name = (char *) "No menu";
wv->contents->next = NULL;
+ wv->contents->accel = LISP_TO_VOID (Qnil);
}
assert (wv && wv->type == CASCADE_TYPE && wv->contents);
replace_widget_value_tree (hack_wv, wv->contents);
if (NILP (FRAME_MENUBAR_DATA (f)))
{
struct popup_data *mdata =
- alloc_lcrecord_type (struct popup_data, lrecord_popup_data);
+ alloc_lcrecord_type (struct popup_data, &lrecord_popup_data);
mdata->id = new_lwlib_id ();
mdata->last_menubar_buffer = Qnil;