Revision: 1433
http://geeqie.svn.sourceforge.net/geeqie/?rev=1433&view=rev
Author: zas_
Date: 2009-02-28 16:59:20 +0000 (Sat, 28 Feb 2009)
Log Message:
-----------
image_change_complete(): reduce code redundancy and implify.
Modified Paths:
--------------
trunk/src/image.c
Modified: trunk/src/image.c
===================================================================
--- trunk/src/image.c 2009-02-28 14:40:22 UTC (rev 1432)
+++ trunk/src/image.c 2009-02-28 16:59:20 UTC (rev 1433)
@@ -728,44 +728,36 @@
static void image_change_complete(ImageWindow *imd, gdouble zoom, gint new)
{
image_reset(imd);
+ imd->unknown = TRUE;
- if (imd->image_fd && isfile(imd->image_fd->path))
+ if (!imd->image_fd)
{
- PixbufRenderer *pr;
+ image_change_pixbuf(imd, NULL, zoom, FALSE);
+ }
+ else
+ {
- pr = PIXBUF_RENDERER(imd->pr);
- pr->zoom = zoom; /* store the zoom, needed by the loader
*/
-
- if (image_load_begin(imd, imd->image_fd))
+ if (isfile(imd->image_fd->path))
{
- imd->unknown = FALSE;
- }
- else
- {
- GdkPixbuf *pixbuf;
+ PixbufRenderer *pr;
+
+ pr = PIXBUF_RENDERER(imd->pr);
+ pr->zoom = zoom; /* store the zoom, needed by
the loader */
- pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN);
- image_change_pixbuf(imd, pixbuf, zoom, FALSE);
- g_object_unref(pixbuf);
-
- imd->unknown = TRUE;
+ if (image_load_begin(imd, imd->image_fd))
+ {
+ imd->unknown = FALSE;
+ }
}
- }
- else
- {
- if (imd->image_fd)
+
+ if (imd->unknown == TRUE)
{
GdkPixbuf *pixbuf;
-
+
pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN);
image_change_pixbuf(imd, pixbuf, zoom, FALSE);
g_object_unref(pixbuf);
}
- else
- {
- image_change_pixbuf(imd, NULL, zoom, FALSE);
- }
- imd->unknown = TRUE;
}
image_update_util(imd);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn