]> git.eshelyaron.com Git - emacs.git/commitdiff
gtkutil.c (update_frame_tool_bar): Call prepare_image_for_display
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 26 Jan 2003 18:23:54 +0000 (18:23 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 26 Jan 2003 18:23:54 +0000 (18:23 +0000)
  and handle image load failure (invalid pixmap).

src/ChangeLog
src/gtkutil.c

index de6f0db254bde5f98116e203bb85222abee0d677..69854a306cb0f9c87b29d61fe41f9177e1d87511 100644 (file)
@@ -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):
index d2acfee8c5477fefdb68bde96093a381a412a990..d8d1e36a8a66b10f88c003cca0b7e2fe3118cdce 100644 (file)
@@ -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);