From: Jan Djärv Date: Sun, 26 Jan 2003 18:23:54 +0000 (+0000) Subject: gtkutil.c (update_frame_tool_bar): Call prepare_image_for_display X-Git-Tag: ttn-vms-21-2-B4~11460 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1d1885fc4d26a01772c3c18335339493200319fa;p=emacs.git gtkutil.c (update_frame_tool_bar): Call prepare_image_for_display and handle image load failure (invalid pixmap). --- diff --git a/src/ChangeLog b/src/ChangeLog index de6f0db254b..69854a306cb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-01-26 Jan D. + + * gtkutil.c (update_frame_tool_bar): Call prepare_image_for_display + and handle image load failure. + 2003-01-26 Jason Rumney * w32fns.c (init_jpeg_functions, jpeg_resync_to_restart_wrapper): diff --git a/src/gtkutil.c b/src/gtkutil.c index d2acfee8c54..d8d1e36a8a6 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2740,7 +2740,14 @@ update_frame_tool_bar (f) img_id = lookup_image (f, image); img = IMAGE_FROM_ID (f, img_id); + prepare_image_for_display (f, img); + if (img->load_failed_p || img->pixmap == None) + { + if (wicon) gtk_widget_hide (wicon); + continue; + } + if (! wicon) { GdkPixmap *gpix = gdk_pixmap_foreign_new (img->pixmap);