unconditionally enable fast jpeg thumbnailing
authorVladimir Nadvornik <nadvornik@suse.cz>
Mon, 6 Apr 2009 20:38:54 +0000 (20:38 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Mon, 6 Apr 2009 20:38:54 +0000 (20:38 +0000)
src/options.c
src/options.h
src/preferences.c
src/rcfile.c
src/thumb.c
src/thumb_standard.c

index 5d6f204..a6c72df 100644 (file)
@@ -112,7 +112,6 @@ ConfOptions *init_options(ConfOptions *options)
 
        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;
index d76ab40..0977318 100644 (file)
@@ -78,7 +78,6 @@ struct _ConfOptions
                gint max_height;
                gboolean enable_caching;
                gboolean cache_into_dirs;
-               gboolean fast;
                gboolean use_xvpics;
                gboolean spec_standard;
                guint quality;
index e38f453..54dc552 100644 (file)
@@ -253,7 +253,6 @@ static void config_window_apply(void)
                }
        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 @@ static void config_tab_general(GtkWidget *notebook)
                              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);
 
index 92c88c1..e0f9b63 100644 (file)
@@ -337,7 +337,6 @@ static void write_global_attributes(GString *outstr, gint indent)
        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 @@ static gboolean load_global_params(const gchar **attribute_names, const gchar **
 
                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;
index cc3bb5c..585046e 100644 (file)
@@ -270,11 +270,8 @@ static void thumb_loader_setup(ThumbLoader *tl, const gchar *path)
        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);
index b86879d..892674b 100644 (file)
@@ -593,18 +593,15 @@ static gboolean thumb_loader_std_setup(ThumbLoaderStd *tl, FileData *fd)
        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);