[gthumb] request the original size if the policy is ONE_STEP
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] request the original size if the policy is ONE_STEP
- Date: Mon, 13 Sep 2010 13:39:55 +0000 (UTC)
commit 40e4d62074ab1a981271aa242a18556f031da756
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Sep 13 00:34:58 2010 +0200
request the original size if the policy is ONE_STEP
extensions/image_viewer/gth-image-viewer-page.c | 2 +-
gthumb/gth-image-preloader.c | 11 +++++++++--
gthumb/gth-image-preloader.h | 1 +
3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index 85c95fe..171f064 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -716,7 +716,7 @@ gth_image_viewer_page_real_view (GthViewerPage *base,
gth_image_preloader_load (self->priv->preloader,
self->priv->file_data,
- MAX (window_width, window_height),
+ (gth_image_prelaoder_get_load_policy (self->priv->preloader) == GTH_LOAD_POLICY_TWO_STEPS) ? MAX (window_width, window_height) : -1,
next_file_data,
next2_file_data,
prev_file_data,
diff --git a/gthumb/gth-image-preloader.c b/gthumb/gth-image-preloader.c
index bf57b54..6db2352 100644
--- a/gthumb/gth-image-preloader.c
+++ b/gthumb/gth-image-preloader.c
@@ -31,7 +31,7 @@
#undef DEBUG_PRELOADER
#define GTH_IMAGE_PRELOADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTH_TYPE_IMAGE_PRELOADER, GthImagePreloaderPrivate))
#define NEXT_LOAD_SMALL_TIMEOUT 100
-#define NEXT_LOAD_BIG_TIMEOUT 200
+#define NEXT_LOAD_BIG_TIMEOUT 400
enum {
@@ -344,6 +344,13 @@ gth_image_prelaoder_set_load_policy (GthImagePreloader *self,
}
+GthLoadPolicy
+gth_image_prelaoder_get_load_policy (GthImagePreloader *self)
+{
+ return self->priv->load_policy;
+}
+
+
/* -- gth_image_preloader_load -- */
@@ -527,7 +534,7 @@ start_next_loader (GthImagePreloader *self)
gth_image_loader_load (preloader->loader,
preloader->file_data,
preloader->requested_size,
- G_PRIORITY_DEFAULT,
+ (i == self->priv->requested) ? G_PRIORITY_HIGH : G_PRIORITY_DEFAULT,
preloader->self->priv->cancellable,
image_loader_ready_cb,
load_request);
diff --git a/gthumb/gth-image-preloader.h b/gthumb/gth-image-preloader.h
index c2db0b4..da42106 100644
--- a/gthumb/gth-image-preloader.h
+++ b/gthumb/gth-image-preloader.h
@@ -74,6 +74,7 @@ GthImagePreloader * gth_image_preloader_new (GthLoadPolicy lo
int max_preloaders);
void gth_image_prelaoder_set_load_policy (GthImagePreloader *self,
GthLoadPolicy policy);
+GthLoadPolicy gth_image_prelaoder_get_load_policy (GthImagePreloader *self);
void gth_image_preloader_load (GthImagePreloader *self,
GthFileData *requested,
int requested_size,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]