diff src/image-overlay.c @ 1011:616b14da08c2

do not access image_loader directly
author nadvornik
date Fri, 29 Aug 2008 12:35:13 +0000
parents 6ca2c5fd7b13
children 1646720364cf
line wrap: on
line diff
--- a/src/image-overlay.c	Fri Aug 29 09:59:20 2008 +0000
+++ b/src/image-overlay.c	Fri Aug 29 12:35:13 2008 +0000
@@ -24,6 +24,7 @@
 #include "pixbuf-renderer.h"
 #include "pixbuf_util.h"
 #include "ui_fileops.h"
+#include "image-load.h"
 
 /*
  *----------------------------------------------------------------------------
@@ -523,14 +524,15 @@
 		if (!imd->unknown)
 			{
 			gint w, h;
+			GdkPixbuf *load_pixbuf = image_loader_get_pixbuf(imd->il);
 
 			if (imd->delay_flip &&
-			    imd->il && imd->il->pixbuf &&
-			    image_get_pixbuf(imd) != imd->il->pixbuf)
+			    imd->il && load_pixbuf &&
+			    image_get_pixbuf(imd) != load_pixbuf)
 				{
-				w = gdk_pixbuf_get_width(imd->il->pixbuf);
-				h = gdk_pixbuf_get_height(imd->il->pixbuf);
-				imgpixbuf = imd->il->pixbuf;
+				w = gdk_pixbuf_get_width(load_pixbuf);
+				h = gdk_pixbuf_get_height(load_pixbuf);
+				imgpixbuf = load_pixbuf;
 				}
 			else
 				{
@@ -558,7 +560,7 @@
 		text = g_markup_escape_text(_("Untitled"), -1);
 	}
 
-	with_hist = (imgpixbuf && (osd->show & OSD_SHOW_HISTOGRAM) && osd->histogram && (!imd->il || imd->il->done));
+	with_hist = (imgpixbuf && (osd->show & OSD_SHOW_HISTOGRAM) && osd->histogram && (!imd->il || image_loader_get_is_done(imd->il)));
 	
 	{
 		gint active_marks = 0;
@@ -892,7 +894,7 @@
 		image_osd_icons_hide(osd);
 		}
 
-	if (osd->imd->il && osd->imd->il->done)
+	if (osd->imd->il && image_loader_get_is_done(osd->imd->il))
 		osd->changed_states = IMAGE_STATE_NONE;
 	osd->idle_id = -1;
 	return FALSE;