Revision: 1106
http://geeqie.svn.sourceforge.net/geeqie/?rev=1106&view=rev
Author: nadvornik
Date: 2008-08-29 12:35:13 +0000 (Fri, 29 Aug 2008)
Log Message:
-----------
do not access image_loader directly
Modified Paths:
--------------
trunk/src/fullscreen.c
trunk/src/image-load.c
trunk/src/image-load.h
trunk/src/image-overlay.c
trunk/src/print.c
trunk/src/search.c
trunk/src/thumb.c
trunk/src/thumb_standard.c
Modified: trunk/src/fullscreen.c
===================================================================
--- trunk/src/fullscreen.c 2008-08-29 09:59:20 UTC (rev 1105)
+++ trunk/src/fullscreen.c 2008-08-29 12:35:13 UTC (rev 1106)
@@ -19,6 +19,7 @@
#include "ui_menu.h"
#include "ui_misc.h"
#include "window.h"
+#include "image-load.h"
enum {
FULLSCREEN_CURSOR_HIDDEN = 1 << 0,
@@ -160,7 +161,7 @@
FullScreenData *fs = data;
if (fs->imd->il &&
- fs->imd->il->pixbuf != image_get_pixbuf(fs->imd))
+ image_loader_get_pixbuf(fs->imd->il) != image_get_pixbuf(fs->imd))
{
fullscreen_mouse_set_busy_idle(fs);
}
Modified: trunk/src/image-load.c
===================================================================
--- trunk/src/image-load.c 2008-08-29 09:59:20 UTC (rev 1105)
+++ trunk/src/image-load.c 2008-08-29 12:35:13 UTC (rev 1106)
@@ -520,6 +520,23 @@
return il->done;
}
+FileData *image_loader_get_fd(ImageLoader *il)
+{
+ if (!il) return NULL;
+
+ return il->fd;
+
+}
+
+gint image_loader_get_shrunk(ImageLoader *il)
+{
+ if (!il) return FALSE;
+
+ return il->shrunk;
+
+}
+
+
gint image_load_dimensions(FileData *fd, gint *width, gint *height)
{
ImageLoader *il;
Modified: trunk/src/image-load.h
===================================================================
--- trunk/src/image-load.h 2008-08-29 09:59:20 UTC (rev 1105)
+++ trunk/src/image-load.h 2008-08-29 12:35:13 UTC (rev 1106)
@@ -52,6 +52,8 @@
gchar *image_loader_get_format(ImageLoader *il);
gdouble image_loader_get_percent(ImageLoader *il);
gint image_loader_get_is_done(ImageLoader *il);
+FileData *image_loader_get_fd(ImageLoader *il);
+gint image_loader_get_shrunk(ImageLoader *il);
gint image_load_dimensions(FileData *fd, gint *width, gint *height);
Modified: trunk/src/image-overlay.c
===================================================================
--- trunk/src/image-overlay.c 2008-08-29 09:59:20 UTC (rev 1105)
+++ trunk/src/image-overlay.c 2008-08-29 12:35:13 UTC (rev 1106)
@@ -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;
Modified: trunk/src/print.c
===================================================================
--- trunk/src/print.c 2008-08-29 09:59:20 UTC (rev 1105)
+++ trunk/src/print.c 2008-08-29 12:35:13 UTC (rev 1106)
@@ -2033,7 +2033,7 @@
if (pw->text_fields == 0) return TRUE;
string = g_string_new("");
- path = pw->job_loader->fd->path;
+ path = image_loader_get_fd(pw->job_loader)->path;
if (pw->text_fields & TEXT_INFO_FILENAME)
{
@@ -2062,7 +2062,7 @@
{
if (newline) g_string_append(string, "\n");
if (space) g_string_append(string, " - ");
- g_string_append(string,
text_from_time(filetime(pw->job_loader->fd->path)));
+ g_string_append(string,
text_from_time(filetime(image_loader_get_fd(pw->job_loader)->path)));
newline = proof;
space = !proof;
}
@@ -2072,7 +2072,7 @@
if (newline) g_string_append(string, "\n");
if (space) g_string_append(string, " - ");
- size = text_from_size_abrev(filesize(pw->job_loader->fd->path));
+ size =
text_from_size_abrev(filesize(image_loader_get_fd(pw->job_loader)->path));
g_string_append(string, size);
g_free(size);
}
@@ -2153,7 +2153,7 @@
y = y + h + PRINT_TEXT_PADDING;
success = (success &&
- print_job_text_image(pw, pw->job_loader->fd->path,
x, y, dw, sw, sh, FALSE));
+ print_job_text_image(pw,
image_loader_get_fd(pw->job_loader)->path, x, y, dw, sw, sh, FALSE));
}
image_loader_free(pw->job_loader);
@@ -2274,7 +2274,7 @@
y = y + icon_h + (pw->proof_height - icon_h) / 2 + PRINT_TEXT_PADDING;
success = (success &&
- print_job_text_image(pw, pw->job_loader->fd->path, x, y,
icon_w + PRINT_PROOF_MARGIN * 2, w, h, TRUE));
+ print_job_text_image(pw,
image_loader_get_fd(pw->job_loader)->path, x, y, icon_w + PRINT_PROOF_MARGIN *
2, w, h, TRUE));
if (!success)
{
Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c 2008-08-29 09:59:20 UTC (rev 1105)
+++ trunk/src/search.c 2008-08-29 12:35:13 UTC (rev 1106)
@@ -1518,13 +1518,13 @@
}
if (options->thumbnails.enable_caching &&
- sd->img_loader && sd->img_loader->fd)
+ sd->img_loader && image_loader_get_fd(sd->img_loader))
{
gchar *base;
const gchar *path;
mode_t mode = 0755;
- path = sd->img_loader->fd->path;
+ path = image_loader_get_fd(sd->img_loader)->path;
base = cache_get_location(CACHE_TYPE_SIM, path, FALSE,
&mode);
if (cache_ensure_dir_exists(base, mode))
{
@@ -1532,7 +1532,7 @@
cd->path = cache_get_location(CACHE_TYPE_SIM,
path, TRUE, NULL);
if (cache_sim_data_save(cd))
{
- filetime_set(cd->path,
filetime(sd->img_loader->fd->path));
+ filetime_set(cd->path,
filetime(image_loader_get_fd(sd->img_loader)->path));
}
}
g_free(base);
Modified: trunk/src/thumb.c
===================================================================
--- trunk/src/thumb.c 2008-08-29 09:59:20 UTC (rev 1105)
+++ trunk/src/thumb.c 2008-08-29 12:35:13 UTC (rev 1106)
@@ -214,7 +214,7 @@
tl->fd->thumb_pixbuf = pixbuf;
gdk_pixbuf_ref(tl->fd->thumb_pixbuf);
}
- save = il->shrunk;
+ save = image_loader_get_shrunk(il);
}
if (rotated) gdk_pixbuf_unref(rotated);
Modified: trunk/src/thumb_standard.c
===================================================================
--- trunk/src/thumb_standard.c 2008-08-29 09:59:20 UTC (rev 1105)
+++ trunk/src/thumb_standard.c 2008-08-29 12:35:13 UTC (rev 1106)
@@ -543,7 +543,7 @@
GdkPixbuf *pixbuf;
DEBUG_1("thumb image done: %s", tl->fd ? tl->fd->path : "???");
- DEBUG_1(" from: %s", tl->il->path);
+ DEBUG_1(" from: %s", image_loader_get_fd(tl->il)->path);
pixbuf = image_loader_get_pixbuf(tl->il);
if (!pixbuf)
@@ -566,7 +566,7 @@
if (tl->fd)
{
if (tl->fd->thumb_pixbuf) g_object_unref(tl->fd->thumb_pixbuf);
- tl->fd->thumb_pixbuf = thumb_loader_std_finish(tl, pixbuf,
il->shrunk);
+ tl->fd->thumb_pixbuf = thumb_loader_std_finish(tl, pixbuf,
image_loader_get_shrunk(il));
}
if (tl->func_done) tl->func_done(tl, tl->data);
@@ -584,7 +584,7 @@
}
DEBUG_1("thumb image error: %s", tl->fd->path);
- DEBUG_1(" from: %s", tl->il->fd->path);
+ DEBUG_1(" from: %s", image_loader_get_fd(tl->il)->path);
if (thumb_loader_std_next_source(tl, TRUE)) return;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn