From: Jan Djärv Date: Tue, 6 Nov 2007 11:17:38 +0000 (+0000) Subject: (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and X-Git-Tag: emacs-pretest-22.1.90~424 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59961aa44f8b28b097285537b9d97e8cdaaa724e;p=emacs.git (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and abort with a message on unhandled store_type values. --- diff --git a/src/ChangeLog b/src/ChangeLog index 13c5b452676..af622289279 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-11-06 Jan Dj,Ad(Brv + + * gtkutil.c (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and + abort with a message on unhandled store_type values. + 2007-11-03 Richard Stallman * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays diff --git a/src/gtkutil.c b/src/gtkutil.c index b37620caa9c..86a4703d0b7 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3476,6 +3476,25 @@ xg_tool_bar_menu_proxy (toolitem, user_data) wmenuimage = gtk_image_new_from_pixbuf (dest_pixbuf); } + else + { + fprintf (stderr, "internal error: GTK_IMAGE_PIXBUF failed\n"); + abort (); + } + } + else if (store_type == GTK_IMAGE_ICON_NAME) + { + const gchar *icon_name; + GtkIconSize icon_size; + + gtk_image_get_icon_name (wimage, &icon_name, &icon_size); + wmenuimage = gtk_image_new_from_icon_name (icon_name, + GTK_ICON_SIZE_MENU); + } + else + { + fprintf (stderr, "internal error: store_type is %d\n", store_type); + abort (); } } if (wmenuimage)