From 1d1885fc4d26a01772c3c18335339493200319fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 26 Jan 2003 18:23:54 +0000 Subject: [PATCH] gtkutil.c (update_frame_tool_bar): Call prepare_image_for_display and handle image load failure (invalid pixmap). --- src/ChangeLog | 5 +++++ src/gtkutil.c | 7 +++++++ 2 files changed, 12 insertions(+) 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); -- 2.11.4.GIT