From e3800a406efafb83f5843a1dd560d81424c43fa8 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 15 Jun 2005 10:57:33 +0000 Subject: [PATCH] don't display a preview and don't attempt to create one if the image file 2005-06-15 Sven Neumann * app/core/gimpimagefile.c (gimp_imagefile_load_thumb): * app/widgets/gimpthumbbox.c (gimp_thumb_box_auto_thumbnail): don't display a preview and don't attempt to create one if the image file does not exist any longer (bug #307672). --- ChangeLog | 7 +++++++ app/core/gimpimagefile.c | 3 +++ app/widgets/gimpthumbbox.c | 3 +++ 3 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index e21f478773..29b1c46a5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-06-15 Sven Neumann + + * app/core/gimpimagefile.c (gimp_imagefile_load_thumb): + * app/widgets/gimpthumbbox.c (gimp_thumb_box_auto_thumbnail): + don't display a preview and don't attempt to create one if the + image file does not exist any longer (bug #307672). + 2005-06-15 Sven Neumann * app/actions/dockable-actions.c (dockable_actions_update): set the diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c index 507133992b..126b25d432 100644 --- a/app/core/gimpimagefile.c +++ b/app/core/gimpimagefile.c @@ -683,6 +683,9 @@ gimp_imagefile_load_thumb (GimpImagefile *imagefile, if (gimp_thumbnail_peek_thumb (thumbnail, size) < GIMP_THUMB_STATE_EXISTS) return NULL; + if (thumbnail->image_state == GIMP_THUMB_STATE_NOT_FOUND) + return NULL; + pixbuf = gimp_thumbnail_load_thumb (thumbnail, size, &error); if (! pixbuf) diff --git a/app/widgets/gimpthumbbox.c b/app/widgets/gimpthumbbox.c index b209c0e17e..f1be173984 100644 --- a/app/widgets/gimpthumbbox.c +++ b/app/widgets/gimpthumbbox.c @@ -735,6 +735,9 @@ gimp_thumb_box_auto_thumbnail (GimpThumbBox *box) box->idle_id = 0; + if (thumb->image_state == GIMP_THUMB_STATE_NOT_FOUND) + return FALSE; + switch (thumb->thumb_state) { case GIMP_THUMB_STATE_NOT_FOUND: