changeset 1521:68b73d524ca3

unconditionally enable fast jpeg thumbnailing
author nadvornik
date Mon, 06 Apr 2009 20:38:54 +0000
parents 7216f4a45698
children d7206703d90f
files src/options.c src/options.h src/preferences.c src/rcfile.c src/thumb.c src/thumb_standard.c
diffstat 6 files changed, 10 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/options.c	Mon Apr 06 19:53:59 2009 +0000
+++ b/src/options.c	Mon Apr 06 20:38:54 2009 +0000
@@ -112,7 +112,6 @@
 
 	options->thumbnails.cache_into_dirs = FALSE;
 	options->thumbnails.enable_caching = TRUE;
-	options->thumbnails.fast = TRUE;
 	options->thumbnails.max_height = DEFAULT_THUMB_HEIGHT;
 	options->thumbnails.max_width = DEFAULT_THUMB_WIDTH;
 	options->thumbnails.quality = GDK_INTERP_TILES;
--- a/src/options.h	Mon Apr 06 19:53:59 2009 +0000
+++ b/src/options.h	Mon Apr 06 20:38:54 2009 +0000
@@ -78,7 +78,6 @@
 		gint max_height;
 		gboolean enable_caching;
 		gboolean cache_into_dirs;
-		gboolean fast;
 		gboolean use_xvpics;
 		gboolean spec_standard;
 		guint quality;
--- a/src/preferences.c	Mon Apr 06 19:53:59 2009 +0000
+++ b/src/preferences.c	Mon Apr 06 20:38:54 2009 +0000
@@ -253,7 +253,6 @@
 		}
 	options->thumbnails.enable_caching = c_options->thumbnails.enable_caching;
 	options->thumbnails.cache_into_dirs = c_options->thumbnails.cache_into_dirs;
-	options->thumbnails.fast = c_options->thumbnails.fast;
 	options->thumbnails.use_exif = c_options->thumbnails.use_exif;
 #if 0
 	options->thumbnails.use_xvpics = c_options->thumbnails.use_xvpics;
@@ -930,9 +929,6 @@
 			      options->thumbnails.use_xvpics, &c_options->thumbnails.use_xvpics);
 #endif
 
-	pref_checkbox_new_int(group, _("Faster jpeg thumbnailing (may reduce quality)"),
-			      options->thumbnails.fast, &c_options->thumbnails.fast);
-
 	pref_checkbox_new_int(group, _("Use EXIF thumbnails when available"),
 			      options->thumbnails.use_exif, &c_options->thumbnails.use_exif);
 
--- a/src/rcfile.c	Mon Apr 06 19:53:59 2009 +0000
+++ b/src/rcfile.c	Mon Apr 06 20:38:54 2009 +0000
@@ -337,7 +337,6 @@
 	WRITE_NL(); WRITE_INT(*options, thumbnails.max_height);
 	WRITE_NL(); WRITE_BOOL(*options, thumbnails.enable_caching);
 	WRITE_NL(); WRITE_BOOL(*options, thumbnails.cache_into_dirs);
-	WRITE_NL(); WRITE_BOOL(*options, thumbnails.fast);
 	WRITE_NL(); WRITE_BOOL(*options, thumbnails.use_xvpics);
 	WRITE_NL(); WRITE_BOOL(*options, thumbnails.spec_standard);
 	WRITE_NL(); WRITE_UINT(*options, thumbnails.quality);
@@ -619,7 +618,6 @@
 
 		if (READ_BOOL(*options, thumbnails.enable_caching)) continue;
 		if (READ_BOOL(*options, thumbnails.cache_into_dirs)) continue;
-		if (READ_BOOL(*options, thumbnails.fast)) continue;
 		if (READ_BOOL(*options, thumbnails.use_xvpics)) continue;
 		if (READ_BOOL(*options, thumbnails.spec_standard)) continue;
 		if (READ_UINT_CLAMP(*options, thumbnails.quality, GDK_INTERP_NEAREST, GDK_INTERP_HYPER)) continue;
--- a/src/thumb.c	Mon Apr 06 19:53:59 2009 +0000
+++ b/src/thumb.c	Mon Apr 06 20:38:54 2009 +0000
@@ -270,11 +270,8 @@
 	file_data_unref(fd);
 	image_loader_set_priority(tl->il, G_PRIORITY_LOW);
 
-	if (options->thumbnails.fast)
-		{
-		/* this will speed up jpegs by up to 3x in some cases */
-		image_loader_set_requested_size(tl->il, tl->max_w, tl->max_h);
-		}
+	/* this will speed up jpegs by up to 3x in some cases */
+	image_loader_set_requested_size(tl->il, tl->max_w, tl->max_h);
 
 	g_signal_connect(G_OBJECT(tl->il), "error", (GCallback)thumb_loader_error_cb, tl);
 	if (tl->func_progress) g_signal_connect(G_OBJECT(tl->il), "percent", (GCallback)thumb_loader_percent_cb, tl);
--- a/src/thumb_standard.c	Mon Apr 06 19:53:59 2009 +0000
+++ b/src/thumb_standard.c	Mon Apr 06 20:38:54 2009 +0000
@@ -593,18 +593,15 @@
 	tl->il = image_loader_new(fd);
 	image_loader_set_priority(tl->il, G_PRIORITY_LOW);
 
-	if (options->thumbnails.fast)
+	/* this will speed up jpegs by up to 3x in some cases */
+	if (tl->requested_width <= THUMB_SIZE_NORMAL &&
+	    tl->requested_height <= THUMB_SIZE_NORMAL)
 		{
-		/* this will speed up jpegs by up to 3x in some cases */
-		if (tl->requested_width <= THUMB_SIZE_NORMAL &&
-		    tl->requested_height <= THUMB_SIZE_NORMAL)
-			{
-			image_loader_set_requested_size(tl->il, THUMB_SIZE_NORMAL, THUMB_SIZE_NORMAL);
-			}
-		else
-			{
-			image_loader_set_requested_size(tl->il, THUMB_SIZE_LARGE, THUMB_SIZE_LARGE);
-			}
+		image_loader_set_requested_size(tl->il, THUMB_SIZE_NORMAL, THUMB_SIZE_NORMAL);
+		}
+	else
+		{
+		image_loader_set_requested_size(tl->il, THUMB_SIZE_LARGE, THUMB_SIZE_LARGE);
 		}
 
 	g_signal_connect(G_OBJECT(tl->il), "error", (GCallback)thumb_loader_std_error_cb, tl);