aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv <[email protected]>2003-01-26 18:23:54 +0000
committerJan Djärv <[email protected]>2003-01-26 18:23:54 +0000
commit1d1885fc4d26a01772c3c18335339493200319fa (patch)
tree835639afea4bbfc6b2aee00c2e5d1ce4752554cd
parentab5a535caafca5506f0fb34b2113b6ea849154a8 (diff)
gtkutil.c (update_frame_tool_bar): Call prepare_image_for_display
and handle image load failure (invalid pixmap).
-rw-r--r--src/ChangeLog5
-rw-r--r--src/gtkutil.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index de6f0db254..69854a306c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-26 Jan D. <[email protected]>
+
+ * gtkutil.c (update_frame_tool_bar): Call prepare_image_for_display
+ and handle image load failure.
+
2003-01-26 Jason Rumney <[email protected]>
* w32fns.c (init_jpeg_functions, jpeg_resync_to_restart_wrapper):
diff --git a/src/gtkutil.c b/src/gtkutil.c
index d2acfee8c5..d8d1e36a8a 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);