changeset 49468:f2be5cd8262f

gtkutil.c (update_frame_tool_bar): Call prepare_image_for_display and handle image load failure (invalid pixmap).
author Jan Djärv <jan.h.d@swipnet.se>
date Sun, 26 Jan 2003 18:23:54 +0000
parents c057b532bd92
children edde976160fb
files src/ChangeLog src/gtkutil.c
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Jan 26 18:04:55 2003 +0000
+++ b/src/ChangeLog	Sun Jan 26 18:23:54 2003 +0000
@@ -1,3 +1,8 @@
+2003-01-26  Jan D.  <jan.h.d@swipnet.se>
+
+	* gtkutil.c (update_frame_tool_bar): Call prepare_image_for_display
+	and handle image load failure.
+
 2003-01-26  Jason Rumney  <jasonr@gnu.org>
 
 	* w32fns.c (init_jpeg_functions, jpeg_resync_to_restart_wrapper):
--- a/src/gtkutil.c	Sun Jan 26 18:04:55 2003 +0000
+++ b/src/gtkutil.c	Sun Jan 26 18:23:54 2003 +0000
@@ -2740,7 +2740,14 @@
 
       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);