diff src/gtkutil.c @ 83652:5b644ae74c91

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 846-851) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 88-92) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 242-244) - Update from CVS Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-31
author Miles Bader <miles@gnu.org>
date Mon, 13 Aug 2007 13:51:08 +0000
parents b210fca2fe6e 25c5bc8d8b8e
children a73440d2f146
line wrap: on
line diff
--- a/src/gtkutil.c	Tue Aug 07 13:21:03 2007 +0000
+++ b/src/gtkutil.c	Mon Aug 13 13:51:08 2007 +0000
@@ -3372,8 +3372,16 @@
 
   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.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
@@ -3794,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;
         }
@@ -3811,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. */