Mercurial > emacs
changeset 78538:2fcf45c12927
(update_frame_tool_bar): Use -1 as index
to gtk_toolbar_insert.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Mon, 13 Aug 2007 06:36:31 +0000 |
parents | 4164b3c91734 |
children | d7110429d0a7 |
files | src/gtkutil.c |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkutil.c Sun Aug 12 18:11:57 2007 +0000 +++ b/src/gtkutil.c Mon Aug 13 06:36:31 2007 +0000 @@ -3372,12 +3372,15 @@ key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); XSETFRAME (frame, f); + + /* We generate two events here. The first one is to set the prefix + to `(tool_bar)', see keyboard.c. */ event.kind = TOOL_BAR_EVENT; event.frame_or_window = frame; - event.arg = frame; - kbd_buffer_store_event (&event); - - event.kind = TOOL_BAR_EVENT; + event.arg = frame; + kbd_buffer_store_event (&event); + + event.kind = TOOL_BAR_EVENT; event.frame_or_window = frame; event.arg = key; /* Convert between the modifier bits GDK uses and the modifier bits @@ -3799,7 +3802,7 @@ gtk_container_add (GTK_CONTAINER (weventbox), wbutton); ti = gtk_tool_item_new (); gtk_container_add (GTK_CONTAINER (ti), weventbox); - gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); + gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1); } continue; } @@ -3816,7 +3819,7 @@ gtk_container_add (GTK_CONTAINER (weventbox), wbutton); ti = gtk_tool_item_new (); gtk_container_add (GTK_CONTAINER (ti), weventbox); - gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); + gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1); /* The EMACS_INT cast avoids a warning. */