Mercurial > emacs
changeset 30472:0c982ed8515f
(menu_highlight_callback): Call show_help_echo directly
if called for a popup menu.
(xmenu_show): Store help string in widget values.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 26 Jul 2000 13:07:15 +0000 |
parents | 1db07314f2fc |
children | deaccf3300df |
files | src/xmenu.c |
diffstat | 1 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xmenu.c Wed Jul 26 13:05:03 2000 +0000 +++ b/src/xmenu.c Wed Jul 26 13:07:15 2000 +0000 @@ -1198,10 +1198,15 @@ struct frame *f; Lisp_Object frame, help; + help = wv && wv->help ? build_string (wv->help) : Qnil; + /* Determine the frame for the help event. */ f = menubar_id_to_frame (id); if (f) - XSETFRAME (frame, f); + { + XSETFRAME (frame, f); + kbd_buffer_store_help_event (frame, help); + } else { /* WIDGET is the popup menu. It's parent is the frame's @@ -1217,11 +1222,9 @@ FRAME_X_P (f) && f->output_data.x->widget == frame_widget)) break; } + + show_help_echo (help, Qnil, Qnil, Qnil, 1); } - - /* Store the help event. */ - help = wv && wv->help ? build_string (wv->help) : Qnil; - kbd_buffer_store_help_event (frame, help); } /* This callback is called from the menu bar pulldown menu @@ -2054,7 +2057,7 @@ else { /* Create a new item within current pane. */ - Lisp_Object item_name, enable, descrip, def, type, selected; + Lisp_Object item_name, enable, descrip, def, type, selected, help; item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; descrip @@ -2062,6 +2065,7 @@ def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; type = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_TYPE]; selected = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_SELECTED]; + help = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_HELP]; #ifndef HAVE_MULTILINGUAL_MENU if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) @@ -2096,6 +2100,8 @@ abort (); wv->selected = !NILP (selected); + if (STRINGP (help)) + wv->help = XSTRING (help)->data; prev_wv = wv;