changeset 333:767b53cd9ab7

Rename thumbnails related options.
author zas_
date Sat, 12 Apr 2008 09:41:44 +0000
parents 3c4bad726e98
children df868b947aa0
files src/cache-loader.c src/cache.c src/cache_maint.c src/collect-io.c src/collect-table.c src/dupe.c src/globals.c src/layout.c src/main.c src/pan-view.c src/preferences.c src/rcfile.c src/search.c src/thumb.c src/thumb_standard.c src/typedefs.h src/view_file_icon.c src/view_file_list.c
diffstat 18 files changed, 126 insertions(+), 124 deletions(-) [+]
line wrap: on
line diff
--- a/src/cache-loader.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/cache-loader.c	Sat Apr 12 09:41:44 2008 +0000
@@ -157,7 +157,7 @@
 	else
 		{
 		/* done, save then call done function */
-		if (options->enable_thumb_caching &&
+		if (options->thumbnails.enable_caching &&
 		    cl->done_mask != CACHE_LOADER_NONE)
 			{
 			gchar *base;
--- a/src/cache.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/cache.c	Sat Apr 12 09:41:44 2008 +0000
@@ -660,7 +660,7 @@
 		cache_ext = NULL;
 		}
 
-	if (((type != CACHE_TYPE_METADATA && options->enable_thumb_dirs) ||
+	if (((type != CACHE_TYPE_METADATA && options->thumbnails.cache_into_dirs) ||
 	     (type == CACHE_TYPE_METADATA && options->enable_metadata_dirs)) &&
 	    access_file(base, W_OK))
 		{
@@ -703,7 +703,7 @@
 		}
 	else
 		{
-		prefer_local = options->enable_thumb_dirs;
+		prefer_local = options->thumbnails.cache_into_dirs;
 		}
 
 	if (prefer_local)
--- a/src/cache_maint.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/cache_maint.c	Sat Apr 12 09:41:44 2008 +0000
@@ -547,7 +547,7 @@
 		}
 	g_free(base);
 
-	if (options->enable_thumb_caching && options->thumbnail_spec_standard)
+	if (options->thumbnails.enable_caching && options->thumbnails.spec_standard)
 		thumb_std_maint_moved(src, dest);
 }
 
@@ -575,7 +575,7 @@
 	cache_file_remove(buf);
 	g_free(buf);
 
-	if (options->enable_thumb_caching && options->thumbnail_spec_standard)
+	if (options->thumbnails.enable_caching && options->thumbnails.spec_standard)
 		thumb_std_maint_removed(fd->path);
 }
 
@@ -740,7 +740,7 @@
 		path = cd->list->data;
 		cd->list = g_list_remove(cd->list, path);
 
-		cd->tl = (ThumbLoaderStd *)thumb_loader_new(options->thumb_max_width, options->thumb_max_height);
+		cd->tl = (ThumbLoaderStd *)thumb_loader_new(options->thumbnails.max_width, options->thumbnails.max_height);
 		thumb_loader_set_callbacks((ThumbLoader *)cd->tl,
 					   cache_manager_render_thumb_done_cb,
 					   cache_manager_render_thumb_done_cb,
@@ -851,7 +851,7 @@
 
 	pref_checkbox_new_int(cd->group, _("Include subfolders"), FALSE, &cd->recurse);
 	button = pref_checkbox_new_int(cd->group, _("Store thumbnails local to source images"), FALSE, &cd->local);
-	gtk_widget_set_sensitive(button, options->thumbnail_spec_standard);
+	gtk_widget_set_sensitive(button, options->thumbnails.spec_standard);
 
 	pref_line(cd->gd->vbox, PREF_PAD_SPACE);
 	hbox = pref_box_new(cd->gd->vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
--- a/src/collect-io.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/collect-io.c	Sat Apr 12 09:41:44 2008 +0000
@@ -240,7 +240,7 @@
 	/* setup loader and call it */
 	cd->thumb_info = ci;
 	thumb_loader_free(cd->thumb_loader);
-	cd->thumb_loader = thumb_loader_new(options->thumb_max_width, options->thumb_max_height);
+	cd->thumb_loader = thumb_loader_new(options->thumbnails.max_width, options->thumbnails.max_height);
 	thumb_loader_set_callbacks(cd->thumb_loader,
 				   collection_load_thumb_done_cb,
 				   collection_load_thumb_error_cb,
--- a/src/collect-table.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/collect-table.c	Sat Apr 12 09:41:44 2008 +0000
@@ -205,11 +205,11 @@
 {
 	gint width;
 
-	if (!ct->show_text) return options->thumb_max_width;
-
-	width = options->thumb_max_width + options->thumb_max_width / 2;
+	if (!ct->show_text) return options->thumbnails.max_width;
+
+	width = options->thumbnails.max_width + options->thumbnails.max_width / 2;
 	if (width < THUMB_MIN_ICON_WIDTH) width = THUMB_MIN_ICON_WIDTH;
-	if (width > THUMB_MAX_ICON_WIDTH) width = options->thumb_max_width;
+	if (width > THUMB_MAX_ICON_WIDTH) width = options->thumbnails.max_width;
 
 	return width;
 }
@@ -988,8 +988,8 @@
 	adj = gtk_tree_view_get_vadjustment(GTK_TREE_VIEW(ct->listview));
 	page_size = (gint)adj->page_increment;
 
-	row_height = options->thumb_max_height + THUMB_BORDER_PADDING * 2;
-	if (ct->show_text) row_height += options->thumb_max_height / 3;
+	row_height = options->thumbnails.max_height + THUMB_BORDER_PADDING * 2;
+	if (ct->show_text) row_height += options->thumbnails.max_height / 3;
 
 	ret = page_size / row_height;
 	if (ret < 1) ret = 1;
@@ -1392,7 +1392,7 @@
 	else
 		{
 		GtkAdjustment *adj = gtk_tree_view_get_vadjustment(GTK_TREE_VIEW(ct->listview));
-		widget_auto_scroll_start(ct->listview, adj, -1, options->thumb_max_height / 2,
+		widget_auto_scroll_start(ct->listview, adj, -1, options->thumbnails.max_height / 2,
 					 collection_table_auto_scroll_notify_cb, ct);
 		}
 }
@@ -1594,7 +1594,7 @@
 			if (cell && GQV_IS_CELL_RENDERER_ICON(cell))
 				{
 				g_object_set(G_OBJECT(cell), "fixed_width", thumb_width,
-							     "fixed_height", options->thumb_max_height,
+							     "fixed_height", options->thumbnails.max_height,
 							     "show_text", ct->show_text, NULL);
 				}
 			}
--- a/src/dupe.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/dupe.c	Sat Apr 12 09:41:44 2008 +0000
@@ -1327,7 +1327,7 @@
 
 	dw->thumb_item = di;
 	thumb_loader_free(dw->thumb_loader);
-	dw->thumb_loader = thumb_loader_new(options->thumb_max_width, options->thumb_max_height);
+	dw->thumb_loader = thumb_loader_new(options->thumbnails.max_width, options->thumbnails.max_height);
 
 	thumb_loader_set_callbacks(dw->thumb_loader,
 				   dupe_thumb_done_cb,
@@ -1393,7 +1393,7 @@
 			di->width = gdk_pixbuf_get_width(pixbuf);
 			di->height = gdk_pixbuf_get_height(pixbuf);
 			}
-		if (options->enable_thumb_caching)
+		if (options->thumbnails.enable_caching)
 			{
 			dupe_item_write_cache(di);
 			}
@@ -1451,14 +1451,14 @@
 					dupe_window_update_progress(dw, _("Reading checksums..."),
 						dw->setup_count == 0 ? 0.0 : (gdouble)(dw->setup_n - 1) / dw->setup_count, FALSE);
 
-					if (options->enable_thumb_caching)
+					if (options->thumbnails.enable_caching)
 						{
 						dupe_item_read_cache(di);
 						if (di->md5sum) return TRUE;
 						}
 
 					di->md5sum = md5_text_from_file_utf8(di->fd->path, "");
-					if (options->enable_thumb_caching)
+					if (options->thumbnails.enable_caching)
 						{
 						dupe_item_write_cache(di);
 						}
@@ -1484,14 +1484,14 @@
 					dupe_window_update_progress(dw, _("Reading dimensions..."),
 						dw->setup_count == 0 ? 0.0 : (gdouble)(dw->setup_n - 1) / dw->setup_count, FALSE);
 
-					if (options->enable_thumb_caching)
+					if (options->thumbnails.enable_caching)
 						{
 						dupe_item_read_cache(di);
 						if (di->width != 0 || di->height != 0) return TRUE;
 						}
 
 					image_load_dimensions(di->fd, &di->width, &di->height);
-					if (options->enable_thumb_caching)
+					if (options->thumbnails.enable_caching)
 						{
 						dupe_item_write_cache(di);
 						}
@@ -1518,7 +1518,7 @@
 					dupe_window_update_progress(dw, _("Reading similarity data..."),
 						dw->setup_count == 0 ? 0.0 : (gdouble)dw->setup_n / dw->setup_count, FALSE);
 
-					if (options->enable_thumb_caching)
+					if (options->thumbnails.enable_caching)
 						{
 						dupe_item_read_cache(di);
 						if (cache_sim_data_filled(di->simd))
@@ -2751,14 +2751,14 @@
 	column = gtk_tree_view_get_column(GTK_TREE_VIEW(listview), DUPE_COLUMN_THUMB - 1);
 	if (!column) return;
 
-	gtk_tree_view_column_set_fixed_width(column, (thumb) ? options->thumb_max_width : 4);
+	gtk_tree_view_column_set_fixed_width(column, (thumb) ? options->thumbnails.max_width : 4);
 	
 	list = gtk_tree_view_column_get_cell_renderers(column);
 	if (!list) return;
 	cell = list->data;
 	g_list_free(list);
 
-	g_object_set(G_OBJECT(cell), "height", (thumb) ? options->thumb_max_height : -1, NULL);
+	g_object_set(G_OBJECT(cell), "height", (thumb) ? options->thumbnails.max_height : -1, NULL);
 	gtk_tree_view_columns_autosize(GTK_TREE_VIEW(listview));
 }
 
--- a/src/globals.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/globals.c	Sat Apr 12 09:41:44 2008 +0000
@@ -59,19 +59,19 @@
 	options->max_window_size = 100;
 	options->limit_autofit_size = FALSE;
 	options->max_autofit_size = 100;
-	options->thumb_max_width = DEFAULT_THUMB_WIDTH;
-	options->thumb_max_height = DEFAULT_THUMB_HEIGHT;
-	options->enable_thumb_caching = TRUE;
-	options->enable_thumb_dirs = FALSE;
-	options->use_xvpics_thumbnails = TRUE;
-	options->thumbnail_fast = TRUE;
-	options->thumbnail_spec_standard = TRUE;
+	options->thumbnails.max_width = DEFAULT_THUMB_WIDTH;
+	options->thumbnails.max_height = DEFAULT_THUMB_HEIGHT;
+	options->thumbnails.enable_caching = TRUE;
+	options->thumbnails.cache_into_dirs = FALSE;
+	options->thumbnails.use_xvpics = TRUE;
+	options->thumbnails.fast = TRUE;
+	options->thumbnails.spec_standard = TRUE;
 	options->enable_metadata_dirs = FALSE;
 	options->file_filter.show_dot_files = FALSE;
 	options->file_filter.disable = FALSE;
 	
 	
-	options->thumbnails_enabled = FALSE;
+	options->thumbnails.enabled = FALSE;
 	options->file_sort.method = SORT_NAME;
 	options->file_sort.ascending = TRUE;
 	
@@ -87,7 +87,7 @@
 	options->collections.rectangular_selection = FALSE;
 	
 	options->tile_cache_max = 10;
-	options->thumbnail_quality = (gint)GDK_INTERP_TILES;
+	options->thumbnails.quality = (gint)GDK_INTERP_TILES;
 	options->zoom_quality = (gint)GDK_INTERP_BILINEAR;
 	options->dither_quality = (gint)GDK_RGB_DITHER_NORMAL;
 	
--- a/src/layout.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/layout.c	Sat Apr 12 09:41:44 2008 +0000
@@ -1879,7 +1879,7 @@
 
 	lw = g_new0(LayoutWindow, 1);
 
-	lw->thumbs_enabled = options->thumbnails_enabled;
+	lw->thumbs_enabled = options->thumbnails.enabled;
 	lw->sort_method = SORT_NAME;
 	lw->sort_ascend = TRUE;
 
--- a/src/main.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/main.c	Sat Apr 12 09:41:44 2008 +0000
@@ -1211,7 +1211,7 @@
 
 	layout_views_get(NULL, &options->layout.view_as_tree, &options->layout.view_as_icons);
 
-	options->thumbnails_enabled = layout_thumb_get(NULL);
+	options->thumbnails.enabled = layout_thumb_get(NULL);
 	layout_sort_get(NULL, &options->file_sort.method, &options->file_sort.ascending);
 
 	layout_geometry_get_tools(NULL, &options->float_window_x, &options->float_window_y,
--- a/src/pan-view.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/pan-view.c	Sat Apr 12 09:41:44 2008 +0000
@@ -2566,8 +2566,8 @@
 		return TRUE;
 		}
 
-	if (options->enable_thumb_caching &&
-	    options->thumbnail_spec_standard) return FALSE;
+	if (options->thumbnails.enable_caching &&
+	    options->thumbnails.spec_standard) return FALSE;
 
 	if (!pref_list_int_get(PAN_PREF_GROUP, PAN_PREF_HIDE_WARNING, &hide_dlg)) hide_dlg = FALSE;
 	if (hide_dlg) return FALSE;
@@ -2589,9 +2589,9 @@
 	group = pref_box_new(group, TRUE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
 
 	ct_button = pref_checkbox_new_int(group, _("Cache thumbnails"),
-			  		  options->enable_thumb_caching, &options->enable_thumb_caching);
+			  		  options->thumbnails.enable_caching, &options->thumbnails.enable_caching);
 	button = pref_checkbox_new_int(group, _("Use shared thumbnail cache"),
-				       options->thumbnail_spec_standard, &options->thumbnail_spec_standard);
+				       options->thumbnails.spec_standard, &options->thumbnails.spec_standard);
 	pref_checkbox_link_sensitivity(ct_button, button);
 
 	pref_line(box, 0);
--- a/src/preferences.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/preferences.c	Sat Apr 12 09:41:44 2008 +0000
@@ -198,15 +198,15 @@
 	options->limit_autofit_size = c_options->limit_autofit_size;
 	options->max_autofit_size = c_options->max_autofit_size;
 	options->progressive_key_scrolling = c_options->progressive_key_scrolling;
-	options->thumb_max_width = c_options->thumb_max_width;
-	options->thumb_max_height = c_options->thumb_max_height;
-	options->enable_thumb_caching = c_options->enable_thumb_caching;
-	options->enable_thumb_dirs = c_options->enable_thumb_dirs;
-	options->thumbnail_fast = c_options->thumbnail_fast;
+	options->thumbnails.max_width = c_options->thumbnails.max_width;
+	options->thumbnails.max_height = c_options->thumbnails.max_height;
+	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;
 #if 0
-	options->use_xvpics_thumbnails = c_options->use_xvpics_thumbnails;
+	options->thumbnails.use_xvpics = c_options->thumbnails.use_xvpics;
 #endif
-	options->thumbnail_spec_standard = c_options->thumbnail_spec_standard;
+	options->thumbnails.spec_standard = c_options->thumbnails.spec_standard;
 	options->enable_metadata_dirs = c_options->enable_metadata_dirs;
 	options->file_filter.show_dot_files = c_options->file_filter.show_dot_files;
 	options->file_sort.case_sensitive = c_options->file_sort.case_sensitive;
@@ -226,7 +226,7 @@
 
 	options->tile_cache_max = c_options->tile_cache_max;
 
-	options->thumbnail_quality = c_options->thumbnail_quality;
+	options->thumbnails.quality = c_options->thumbnails.quality;
 	options->zoom_quality = c_options->zoom_quality;
 
 	options->zoom_increment = c_options->zoom_increment;
@@ -475,13 +475,13 @@
 
 	if (n >= 0 && n < sizeof(thumb_size_list) / sizeof(ThumbSize))
 		{
-		c_options->thumb_max_width = thumb_size_list[n].w;
-		c_options->thumb_max_height = thumb_size_list[n].h;
+		c_options->thumbnails.max_width = thumb_size_list[n].w;
+		c_options->thumbnails.max_height = thumb_size_list[n].h;
 		}
 	else if (n > 0)
 		{
-		c_options->thumb_max_width = options->thumb_max_width;
-		c_options->thumb_max_height = options->thumb_max_height;
+		c_options->thumbnails.max_width = options->thumbnails.max_width;
+		c_options->thumbnails.max_height = options->thumbnails.max_height;
 		}
 }
 
@@ -491,8 +491,8 @@
 	gint current;
 	gint i;
 
-	c_options->thumb_max_width = options->thumb_max_width;
-	c_options->thumb_max_height = options->thumb_max_height;
+	c_options->thumbnails.max_width = options->thumbnails.max_width;
+	c_options->thumbnails.max_height = options->thumbnails.max_height;
 
 	pref_table_label(table, column, row, text, 0.0);
 
@@ -511,14 +511,14 @@
 		gtk_combo_box_append_text(GTK_COMBO_BOX(combo), buf);
 		g_free(buf);
 	
-		if (w == options->thumb_max_width && h == options->thumb_max_height) current = i;
+		if (w == options->thumbnails.max_width && h == options->thumbnails.max_height) current = i;
 		}
 
 	if (current == -1)
 		{
 		gchar *buf;
 
-		buf = g_strdup_printf("%s %d x %d", _("Custom"), options->thumb_max_width, options->thumb_max_height);
+		buf = g_strdup_printf("%s %d x %d", _("Custom"), options->thumbnails.max_width, options->thumbnails.max_height);
 		gtk_combo_box_append_text(GTK_COMBO_BOX(combo), buf);
 		g_free(buf);
 
@@ -820,30 +820,30 @@
 
 	table = pref_table_new(group, 2, 2, FALSE, FALSE);
 	add_thumb_size_menu(table, 0, 0, _("Size:"));
-	add_quality_menu(table, 0, 1, _("Quality:"), options->thumbnail_quality, &c_options->thumbnail_quality);
+	add_quality_menu(table, 0, 1, _("Quality:"), options->thumbnails.quality, &c_options->thumbnails.quality);
 
 	ct_button = pref_checkbox_new_int(group, _("Cache thumbnails"),
-					  options->enable_thumb_caching, &c_options->enable_thumb_caching);
+					  options->thumbnails.enable_caching, &c_options->thumbnails.enable_caching);
 
 	subgroup = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
 	pref_checkbox_link_sensitivity(ct_button, subgroup);
 
 	button = pref_checkbox_new_int(subgroup, _("Use shared thumbnail cache"),
-				       options->thumbnail_spec_standard, &c_options->thumbnail_spec_standard);
+				       options->thumbnails.spec_standard, &c_options->thumbnails.spec_standard);
 
 	subgroup = pref_box_new(subgroup, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
 	pref_checkbox_link_sensitivity_swap(button, subgroup);
 
 	pref_checkbox_new_int(subgroup, _("Cache thumbnails into .thumbnails"),
-			      options->enable_thumb_dirs, &c_options->enable_thumb_dirs);
+			      options->thumbnails.cache_into_dirs, &c_options->thumbnails.cache_into_dirs);
 
 #if 0
 	pref_checkbox_new_int(subgroup, _("Use xvpics thumbnails when found (read only)"),
-			      options->use_xvpics_thumbnails, &c_options->use_xvpics_thumbnails);
+			      options->thumbnails.use_xvpics, &c_options->thumbnails.use_xvpics);
 #endif
 
 	pref_checkbox_new_int(group, _("Faster jpeg thumbnailing (may reduce quality)"),
-			      options->thumbnail_fast, &c_options->thumbnail_fast);
+			      options->thumbnails.fast, &c_options->thumbnails.fast);
 
 	group = pref_group_new(vbox, FALSE, _("Slide show"), GTK_ORIENTATION_VERTICAL);
 
--- a/src/rcfile.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/rcfile.c	Sat Apr 12 09:41:44 2008 +0000
@@ -313,14 +313,15 @@
 	write_int_option(ssi, "scroll_reset_method", options->scroll_reset_method);
 	secure_fputc(ssi, '\n');
 
-	write_bool_option(ssi, "enable_thumbnails", options->thumbnails_enabled);
-	write_int_option(ssi, "thumbnail_width", options->thumb_max_width);
-	write_int_option(ssi, "thumbnail_height", options->thumb_max_height);
-	write_bool_option(ssi, "cache_thumbnails", options->enable_thumb_caching);
-	write_bool_option(ssi, "cache_thumbnails_into_dirs", options->enable_thumb_dirs);
-	write_bool_option(ssi, "thumbnail_fast", options->thumbnail_fast);
-	write_bool_option(ssi, "use_xvpics_thumbnails", options->use_xvpics_thumbnails);
-	write_bool_option(ssi, "thumbnail_spec_standard", options->thumbnail_spec_standard);
+	write_bool_option(ssi, "thumbnails.enabled", options->thumbnails.enabled);
+	write_int_option(ssi, "thumbnails.max_width", options->thumbnails.max_width);
+	write_int_option(ssi, "thumbnails.max_height", options->thumbnails.max_height);
+	write_bool_option(ssi, "thumbnails.enable_caching", options->thumbnails.enable_caching);
+	write_bool_option(ssi, "thumbnails.cache_into_dirs", options->thumbnails.cache_into_dirs);
+	write_bool_option(ssi, "thumbnails.fast", options->thumbnails.fast);
+	write_bool_option(ssi, "thumbnails.use_xvpics", options->thumbnails.use_xvpics);
+	write_bool_option(ssi, "thumbnails.spec_standard", options->thumbnails.spec_standard);
+	write_int_option(ssi, "thumbnails.quality", options->thumbnails.quality);
 	secure_fputc(ssi, '\n');
 
 	write_bool_option(ssi, "local_metadata", options->enable_metadata_dirs);
@@ -348,7 +349,6 @@
 	write_bool_option(ssi, "in_place_rename", options->enable_in_place_rename);
 	write_int_option(ssi, "open_recent_max", options->recent_list_max);
 	write_int_option(ssi, "image_cache_size_max", options->tile_cache_max);
-	write_int_option(ssi, "thumbnail_quality", options->thumbnail_quality);
 	write_int_option(ssi, "zoom_quality", options->zoom_quality);
 	write_int_option(ssi, "dither_quality", options->dither_quality);
 	write_int_option(ssi, "zoom_increment", options->zoom_increment);
@@ -578,24 +578,26 @@
 		options->scroll_reset_method = read_int_option(f, option,
 			"scroll_reset_method", value, options->scroll_reset_method);
 
-		options->thumbnails_enabled = read_bool_option(f, option,
-			"enable_thumbnails", value, options->thumbnails_enabled);
-		options->thumb_max_width = read_int_option(f, option,
-			"thumbnail_width", value, options->thumb_max_width);
-		if (options->thumb_max_width < 16) options->thumb_max_width = 16;
-		options->thumb_max_height = read_int_option(f, option,
-			"thumbnail_height", value, options->thumb_max_height);
-		if (options->thumb_max_height < 16) options->thumb_max_height = 16;
-		options->enable_thumb_caching = read_bool_option(f, option,
-			"cache_thumbnails", value, options->enable_thumb_caching);
-		options->enable_thumb_dirs = read_bool_option(f, option,
-			"cache_thumbnails_into_dirs", value, options->enable_thumb_dirs);
-		options->thumbnail_fast = read_bool_option(f, option,
-			"thumbnail_fast", value, options->thumbnail_fast);
-		options->use_xvpics_thumbnails = read_bool_option(f, option,
-			"use_xvpics_thumbnails", value, options->use_xvpics_thumbnails);
-		options->thumbnail_spec_standard = read_bool_option(f, option,
-			"thumbnail_spec_standard", value, options->thumbnail_spec_standard);
+		options->thumbnails.enabled = read_bool_option(f, option,
+			"thumbnails.enabled", value, options->thumbnails.enabled);
+		options->thumbnails.max_width = read_int_option(f, option,
+			"thumbnails.max_width", value, options->thumbnails.max_width);
+		if (options->thumbnails.max_width < 16) options->thumbnails.max_width = 16;
+		options->thumbnails.max_height = read_int_option(f, option,
+			"thumbnails.max_height", value, options->thumbnails.max_height);
+		if (options->thumbnails.max_height < 16) options->thumbnails.max_height = 16;
+		options->thumbnails.enable_caching = read_bool_option(f, option,
+			"thumbnails.enable_caching", value, options->thumbnails.enable_caching);
+		options->thumbnails.cache_into_dirs = read_bool_option(f, option,
+			"thumbnails.cache_into_dirs", value, options->thumbnails.cache_into_dirs);
+		options->thumbnails.fast = read_bool_option(f, option,
+			"thumbnails.fast", value, options->thumbnails.fast);
+		options->thumbnails.use_xvpics = read_bool_option(f, option,
+			"thumbnails.use_xvpics", value, options->thumbnails.use_xvpics);
+		options->thumbnails.spec_standard = read_bool_option(f, option,
+			"thumbnails.spec_standard", value, options->thumbnails.spec_standard);
+		options->thumbnails.quality = CLAMP(read_int_option(f, option,
+			"thumbnails.quality", value, options->thumbnails.quality), GDK_INTERP_NEAREST, GDK_INTERP_HYPER);
 
 		options->enable_metadata_dirs = read_bool_option(f, option,
 			"local_metadata", value, options->enable_metadata_dirs);
@@ -639,8 +641,6 @@
 		options->tile_cache_max = read_int_option(f, option,
 			"image_cache_size_max", value, options->tile_cache_max);
 
-		options->thumbnail_quality = CLAMP(read_int_option(f, option,
-			"thumbnail_quality", value, options->thumbnail_quality), GDK_INTERP_NEAREST, GDK_INTERP_HYPER);
 		options->zoom_quality = CLAMP(read_int_option(f, option,
 			"zoom_quality", value, options->zoom_quality), GDK_INTERP_NEAREST, GDK_INTERP_HYPER);
 		options->dither_quality = CLAMP(read_int_option(f, option,
--- a/src/search.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/search.c	Sat Apr 12 09:41:44 2008 +0000
@@ -779,7 +779,7 @@
 
 	sd->thumb_fd = mfd->fd;
 	thumb_loader_free(sd->thumb_loader);
-	sd->thumb_loader = thumb_loader_new(options->thumb_max_width, options->thumb_max_height);
+	sd->thumb_loader = thumb_loader_new(options->thumbnails.max_width, options->thumbnails.max_height);
 
 	thumb_loader_set_callbacks(sd->thumb_loader,
 				   search_result_thumb_done_cb,
@@ -802,14 +802,14 @@
 	column = gtk_tree_view_get_column(GTK_TREE_VIEW(sd->result_view), SEARCH_COLUMN_THUMB - 1);
 	if (!column) return;
 
-	gtk_tree_view_column_set_fixed_width(column, (sd->thumb_enable) ? options->thumb_max_width : 4);
+	gtk_tree_view_column_set_fixed_width(column, (sd->thumb_enable) ? options->thumbnails.max_width : 4);
 
 	list = gtk_tree_view_column_get_cell_renderers(column);
 	if (!list) return;
 	cell = list->data;
 	g_list_free(list);
 
-	g_object_set(G_OBJECT(cell), "height", (sd->thumb_enable) ? options->thumb_max_height : -1, NULL);
+	g_object_set(G_OBJECT(cell), "height", (sd->thumb_enable) ? options->thumbnails.max_height : -1, NULL);
 	gtk_tree_view_columns_autosize(GTK_TREE_VIEW(sd->result_view));
 }
 
@@ -1500,7 +1500,7 @@
 			image_sim_free(sim);
 			}
 
-		if (options->enable_thumb_caching &&
+		if (options->thumbnails.enable_caching &&
 		    sd->img_loader && sd->img_loader->fd)
 			{
 			gchar *base;
--- a/src/thumb.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/thumb.c	Sat Apr 12 09:41:44 2008 +0000
@@ -196,7 +196,7 @@
 			if (w < 1) w = 1;
 			}
 
-		tl->pixbuf = gdk_pixbuf_scale_simple(pixbuf, w, h, (GdkInterpType)options->thumbnail_quality);
+		tl->pixbuf = gdk_pixbuf_scale_simple(pixbuf, w, h, (GdkInterpType)options->thumbnails.quality);
 		save = TRUE;
 		}
 	else
@@ -255,7 +255,7 @@
 	image_loader_free(tl->il);
 	tl->il = image_loader_new(file_data_new_simple(path));
 
-	if (options->thumbnail_fast)
+	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);
@@ -350,7 +350,7 @@
 			}
 		}
 
-	if (!cache_path && options->use_xvpics_thumbnails)
+	if (!cache_path && options->thumbnails.use_xvpics)
 		{
 		tl->pixbuf = get_xv_thumbnail(tl->path, tl->max_w, tl->max_h);
 		if (tl->pixbuf)
@@ -461,7 +461,7 @@
 {
 	ThumbLoader *tl;
 
-	if (options->thumbnail_spec_standard)
+	if (options->thumbnails.spec_standard)
 		{
 		return (ThumbLoader *)thumb_loader_std_new(width, height);
 		}
@@ -469,7 +469,7 @@
 	tl = g_new0(ThumbLoader, 1);
 	tl->standard_loader = FALSE;
 	tl->path = NULL;
-	tl->cache_enable = options->enable_thumb_caching;
+	tl->cache_enable = options->thumbnails.enable_caching;
 	tl->cache_hit = FALSE;
 	tl->percent_done = 0.0;
 	tl->max_w = width;
--- a/src/thumb_standard.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/thumb_standard.c	Sat Apr 12 09:41:44 2008 +0000
@@ -80,7 +80,7 @@
 	tl->il = NULL;
 	tl->source_path = NULL;
 
-	tl->cache_enable = options->enable_thumb_caching;
+	tl->cache_enable = options->thumbnails.enable_caching;
 	tl->cache_local = FALSE;
 	tl->cache_retry = FALSE;
 
@@ -436,7 +436,7 @@
 								  &thumb_w, &thumb_h))
 					{
 					pixbuf_thumb = gdk_pixbuf_scale_simple(pixbuf, thumb_w, thumb_h,
-									       (GdkInterpType)options->thumbnail_quality);
+									       (GdkInterpType)options->thumbnails.quality);
 					}
 				else
 					{
@@ -484,7 +484,7 @@
 						  &thumb_w, &thumb_h))
 			{
 			result = gdk_pixbuf_scale_simple(pixbuf, thumb_w, thumb_h,
-							 (GdkInterpType)options->thumbnail_quality);
+							 (GdkInterpType)options->thumbnails.quality);
 			}
 		else
 			{
@@ -603,7 +603,7 @@
 {
 	tl->il = image_loader_new_from_path(path);
 
-	if (options->thumbnail_fast)
+	if (options->thumbnails.fast)
 		{
 		/* this will speed up jpegs by up to 3x in some cases */
 		if (tl->requested_width <= THUMB_SIZE_NORMAL &&
--- a/src/typedefs.h	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/typedefs.h	Sat Apr 12 09:41:44 2008 +0000
@@ -802,15 +802,17 @@
 	GdkColor window_background_color;
 
 	/* thumbnails */
-	gint thumb_max_width;
-	gint thumb_max_height;
-	gint enable_thumb_caching;
-	gint enable_thumb_dirs;
-	gint thumbnail_fast;
-	gint use_xvpics_thumbnails;
-	gint thumbnail_spec_standard;
-	gint thumbnail_quality;
-	gint thumbnails_enabled;
+	struct {
+		gint max_width;
+		gint max_height;
+		gint enable_caching;
+		gint cache_into_dirs;
+		gint fast;
+		gint use_xvpics;
+		gint spec_standard;
+		gint quality;
+		gint enabled;	/* TODO: move to layout ? */
+	} thumbnails;
 
 	/* file filtering */
 	struct {
--- a/src/view_file_icon.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/view_file_icon.c	Sat Apr 12 09:41:44 2008 +0000
@@ -411,11 +411,11 @@
 {
 	gint width;
 
-	if (!vfi->show_text) return options->thumb_max_width;
-
-	width = options->thumb_max_width + options->thumb_max_width / 2;
+	if (!vfi->show_text) return options->thumbnails.max_width;
+
+	width = options->thumbnails.max_width + options->thumbnails.max_width / 2;
 	if (width < THUMB_MIN_ICON_WIDTH) width = THUMB_MIN_ICON_WIDTH;
-	if (width > THUMB_MAX_ICON_WIDTH) width = options->thumb_max_width;
+	if (width > THUMB_MAX_ICON_WIDTH) width = options->thumbnails.max_width;
 
 	return width;
 }
@@ -1256,8 +1256,8 @@
 	adj = gtk_tree_view_get_vadjustment(GTK_TREE_VIEW(vfi->listview));
 	page_size = (gint)adj->page_increment;
 
-	row_height = options->thumb_max_height + THUMB_BORDER_PADDING * 2;
-	if (vfi->show_text) row_height += options->thumb_max_height / 3;
+	row_height = options->thumbnails.max_height + THUMB_BORDER_PADDING * 2;
+	if (vfi->show_text) row_height += options->thumbnails.max_height / 3;
 
 	ret = page_size / row_height;
 	if (ret < 1) ret = 1;
@@ -1664,7 +1664,7 @@
 			if (cell && GQV_IS_CELL_RENDERER_ICON(cell))
 				{
 				g_object_set(G_OBJECT(cell), "fixed_width", thumb_width,
-							     "fixed_height", options->thumb_max_height,
+							     "fixed_height", options->thumbnails.max_height,
 							     "show_text", vfi->show_text, NULL);
 				}
 			}
@@ -1990,7 +1990,7 @@
 
 	thumb_loader_free(vfi->thumbs_loader);
 
-	vfi->thumbs_loader = thumb_loader_new(options->thumb_max_width, options->thumb_max_height);
+	vfi->thumbs_loader = thumb_loader_new(options->thumbnails.max_width, options->thumbnails.max_height);
 	thumb_loader_set_callbacks(vfi->thumbs_loader,
 				   vficon_thumb_done_cb,
 				   vficon_thumb_error_cb,
--- a/src/view_file_list.c	Sat Apr 12 09:12:37 2008 +0000
+++ b/src/view_file_list.c	Sat Apr 12 09:41:44 2008 +0000
@@ -1225,7 +1225,7 @@
 
 	thumb_loader_free(vfl->thumbs_loader);
 
-	vfl->thumbs_loader = thumb_loader_new(options->thumb_max_width, options->thumb_max_height);
+	vfl->thumbs_loader = thumb_loader_new(options->thumbnails.max_width, options->thumbnails.max_height);
 	thumb_loader_set_callbacks(vfl->thumbs_loader,
 				   vflist_thumb_done_cb,
 				   vflist_thumb_error_cb,
@@ -1633,14 +1633,14 @@
 	column = gtk_tree_view_get_column(GTK_TREE_VIEW(listview), FILE_COLUMN_THUMB - 1);
 	if (!column) return;
 
-	gtk_tree_view_column_set_fixed_width(column, ((thumb) ? options->thumb_max_width : 4) + 10);
+	gtk_tree_view_column_set_fixed_width(column, ((thumb) ? options->thumbnails.max_width : 4) + 10);
 
 	list = gtk_tree_view_column_get_cell_renderers(column);
 	if (!list) return;
 	cell = list->data;
 	g_list_free(list);
 
-	g_object_set(G_OBJECT(cell), "height", (thumb) ? options->thumb_max_height : -1, NULL);
+	g_object_set(G_OBJECT(cell), "height", (thumb) ? options->thumbnails.max_height : -1, NULL);
 	gtk_tree_view_columns_autosize(GTK_TREE_VIEW(listview));
 }