Index: eel-gtk-extensions.h
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-gtk-extensions.h,v
retrieving revision 1.25
diff -u -r1.25 eel-gtk-extensions.h
--- eel-gtk-extensions.h	21 Apr 2002 16:50:24 -0000	1.25
+++ eel-gtk-extensions.h	11 Jul 2002 20:37:02 -0000
@@ -42,6 +42,8 @@
 #define EEL_STANDARD_CLOSE_WINDOW_CONTROL_KEY 	'w'
 
 /* GtkButton */
+GtkWidget*            eel_gtk_button_new_with_stock_icon              (const gchar	    *label,
+								       const gchar	    *stock_id);
 void                  eel_gtk_button_set_padding                      (GtkButton            *button,
 								       int                   pad_amount);
 
Index: eel-gtk-extensions.c
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-gtk-extensions.c,v
retrieving revision 1.49
diff -u -r1.49 eel-gtk-extensions.c
--- eel-gtk-extensions.c	3 Jul 2002 05:18:34 -0000	1.49
+++ eel-gtk-extensions.c	11 Jul 2002 20:37:02 -0000
@@ -40,8 +40,11 @@
 #include <gdk/gdkkeysyms.h>
 #include <gdk/gdkprivate.h>
 #include <gdk/gdkx.h>
+#include <gtk/gtkalignment.h>
 #include <gtk/gtkdialog.h>
 #include <gtk/gtkdnd.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkimage.h>
 #include <gtk/gtkmain.h>
 #include <gtk/gtkrc.h>
 #include <gtk/gtkselection.h>
@@ -69,6 +72,37 @@
  * for that, and add some slop.
  */
 #define MAXIMUM_WM_REPARENTING_DEPTH 4
+
+/**
+ * eel_gtk_button_new_with_stock_icon:
+ * 
+ * @label: the button label, which may include a mnemonic accelerator.
+ * @stock_id: the stock icon to use.
+ *
+ * Creates a GtkButton with a mnemonic label and a stock icon.
+ *
+ * Return value: a new GtkButton widget.
+ **/
+GtkWidget*
+eel_gtk_button_new_with_stock_icon (const gchar *label, const gchar *stock_id)
+{
+	GtkWidget *button, *l, *image, *hbox, *align;
+
+	/* This is mainly copied from gtk_button_construct_child(). */
+	button = gtk_button_new ();
+	l = gtk_label_new_with_mnemonic (label);
+	gtk_label_set_mnemonic_widget (GTK_LABEL (l), GTK_WIDGET (button));
+	image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
+	hbox = gtk_hbox_new (FALSE, 2);
+	align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
+	gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
+	gtk_box_pack_end (GTK_BOX (hbox), l, FALSE, FALSE, 0);
+	gtk_container_add (GTK_CONTAINER (button), align);
+	gtk_container_add (GTK_CONTAINER (align), hbox);
+	gtk_widget_show_all (align);
+
+	return button;
+}
 
 /**
  * eel_gtk_button_set_padding
