From e4f61b3bae7d3d4e33d84b2d8d9dd6d161a54232 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 13 Aug 2007 06:36:47 +0000 Subject: [PATCH] (update_frame_tool_bar): Use -1 as index to gtk_toolbar_insert. --- src/ChangeLog | 5 +++++ src/gtkutil.c | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0447af98490..3cfec569bdd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-08-13 Jan Dj,Ad(Brv + + * gtkutil.c (update_frame_tool_bar): Use -1 as index + to gtk_toolbar_insert. + 2007-08-11 YAMAMOTO Mitsuharu * xterm.c (x_draw_image_glyph_string): Adjust stipple origin when diff --git a/src/gtkutil.c b/src/gtkutil.c index d463e0e6d79..7dc451a5d04 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3372,13 +3372,16 @@ xg_tool_bar_callback (w, client_data) key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); XSETFRAME (frame, f); - event.kind = TOOL_BAR_EVENT; - event.frame_or_window = frame; - event.arg = frame; - kbd_buffer_store_event (&event); + /* 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.frame_or_window = frame; event.arg = key; /* Convert between the modifier bits GDK uses and the modifier bits Emacs uses. This assumes GDK an X masks are the same, which they are when @@ -3799,7 +3802,7 @@ update_frame_tool_bar (f) 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 @@ update_frame_tool_bar (f) 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. */ -- 2.39.2