Mercurial > geeqie
comparison src/image.c @ 1031:999919edcb7b
fixed handling of broken images
author | nadvornik |
---|---|
date | Wed, 03 Sep 2008 19:52:11 +0000 |
parents | b0db0bd74dba |
children | 7c87b324b9bb |
comparison
equal
deleted
inserted
replaced
1030:f10b680b4baa | 1031:999919edcb7b |
---|---|
420 if (imd->read_ahead_fd->pixbuf) | 420 if (imd->read_ahead_fd->pixbuf) |
421 { | 421 { |
422 g_object_ref(imd->read_ahead_fd->pixbuf); | 422 g_object_ref(imd->read_ahead_fd->pixbuf); |
423 image_cache_set(imd, imd->read_ahead_fd); | 423 image_cache_set(imd, imd->read_ahead_fd); |
424 } | 424 } |
425 else | |
426 { | |
427 imd->read_ahead_fd->pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN); | |
428 } | |
429 } | 425 } |
430 image_loader_free(imd->read_ahead_il); | 426 image_loader_free(imd->read_ahead_il); |
431 imd->read_ahead_il = NULL; | 427 imd->read_ahead_il = NULL; |
432 | 428 |
433 image_complete_util(imd, TRUE); | 429 image_complete_util(imd, TRUE); |
560 { | 556 { |
561 imd->image_fd->pixbuf = gdk_pixbuf_ref(image_loader_get_pixbuf(imd->il)); | 557 imd->image_fd->pixbuf = gdk_pixbuf_ref(image_loader_get_pixbuf(imd->il)); |
562 image_cache_set(imd, imd->image_fd); | 558 image_cache_set(imd, imd->image_fd); |
563 } | 559 } |
564 | 560 |
565 if (imd->delay_flip && | 561 if (!image_loader_get_pixbuf(imd->il)) |
562 { | |
563 GdkPixbuf *pixbuf; | |
564 | |
565 pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN); | |
566 image_change_pixbuf(imd, pixbuf, image_zoom_get(imd)); | |
567 g_object_unref(pixbuf); | |
568 | |
569 imd->unknown = TRUE; | |
570 } | |
571 else if (imd->delay_flip && | |
566 image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) | 572 image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) |
567 { | 573 { |
568 g_object_set(G_OBJECT(imd->pr), "complete", FALSE, NULL); | 574 g_object_set(G_OBJECT(imd->pr), "complete", FALSE, NULL); |
569 image_change_pixbuf(imd, image_loader_get_pixbuf(imd->il), image_zoom_get(imd)); | 575 image_change_pixbuf(imd, image_loader_get_pixbuf(imd->il), image_zoom_get(imd)); |
570 } | 576 } |