summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-07-21 14:35:53 +0000
committerGerd Moellmann <gerd@gnu.org>2000-07-21 14:35:53 +0000
commit6214507352b68ebae83a29589fdb66311fbe691d (patch)
treeec8831e4bc4af81dc5adf560ec873a4b0d206fd9 /src/xmenu.c
parentf95464e4700cd32aa4cf1de188f3951b7a006451 (diff)
downloademacs-6214507352b68ebae83a29589fdb66311fbe691d.tar.gz
(menu_help_callback): Call show_help_echo with
additional arguments OBJECT and POS.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c36
1 files changed, 30 insertions, 6 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index f18250ca256..e341336214a 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -2482,18 +2482,42 @@ xdialog_show (f, keymaps, title, error)
static struct frame *menu_help_frame;
-/* Show help HELP_STRING, or clear help if HELP_STRING is null. This
- cannot be done with generating a HELP_EVENT because XMenuActivate
- contains a loop that doesn't let Emacs process keyboard events. */
+/* Show help HELP_STRING, or clear help if HELP_STRING is null.
+
+ PANE is the pane number, and ITEM is the menu item number in
+ the menu (currently not used).
+
+ This cannot be done with generating a HELP_EVENT because
+ XMenuActivate contains a loop that doesn't let Emacs process
+ keyboard events. */
static void
-menu_help_callback (help_string)
+menu_help_callback (help_string, pane, item)
char *help_string;
+ int pane, item;
{
+ extern Lisp_Object Qmenu_item;
+ Lisp_Object *first_item;
+ Lisp_Object pane_name;
+ Lisp_Object menu_object;
+
+ first_item = XVECTOR (menu_items)->contents;
+ if (EQ (first_item[0], Qt))
+ pane_name = first_item[MENU_ITEMS_PANE_NAME];
+ else if (EQ (first_item[0], Qquote))
+ /* This shouldn't happen, see xmenu_show. */
+ pane_name = build_string ("");
+ else
+ pane_name = first_item[MENU_ITEMS_ITEM_NAME];
+
+ /* (menu-item MENU-NAME PANE-NUMBER) */
+ menu_object = Fcons (Qmenu_item,
+ Fcons (pane_name,
+ Fcons (make_number (pane), Qnil)));
show_help_echo (help_string ? build_string (help_string) : Qnil,
- Qnil, Qnil, 0, 1);
+ Qnil, menu_object, make_number (item), 1);
}
-
+
static Lisp_Object
xmenu_show (f, x, y, for_click, keymaps, title, error)