changeset 338:41c3cb73120f

Rename window options (moved to layout) and re-order rc file.
author zas_
date Sat, 12 Apr 2008 19:33:59 +0000
parents 0565ee45b8ac
children de1c2cd06fce
files src/collect.c src/globals.c src/layout.c src/main.c src/preferences.c src/rcfile.c src/typedefs.h
diffstat 7 files changed, 167 insertions(+), 146 deletions(-) [+]
line wrap: on
line diff
--- a/src/collect.c	Sat Apr 12 17:20:34 2008 +0000
+++ b/src/collect.c	Sat Apr 12 19:33:59 2008 +0000
@@ -1198,7 +1198,7 @@
 				      GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE);
 
 
-	if (options->save_window_positions && path && collection_load_only_geometry(cw->cd, path))
+	if (options->layout.save_window_positions && path && collection_load_only_geometry(cw->cd, path))
 		{
 		/* FIXME: x, y is not implemented */
 		gtk_window_set_default_size(GTK_WINDOW(cw->window), cw->cd->window_w, cw->cd->window_h);
--- a/src/globals.c	Sat Apr 12 17:20:34 2008 +0000
+++ b/src/globals.c	Sat Apr 12 19:33:59 2008 +0000
@@ -21,25 +21,25 @@
 {
 	if (!options) options = g_new0(ConfOptions, 1);
 
-	options->main_window_w = 500;
-	options->main_window_h = 400;
-	options->main_window_x = 0;
-	options->main_window_y = 0;
-	options->main_window_maximized = FALSE;
+	options->layout.main_window.w = 500;
+	options->layout.main_window.h = 400;
+	options->layout.main_window.x = 0;
+	options->layout.main_window.y = 0;
+	options->layout.main_window.maximized = FALSE;
 	
-	options->float_window_w = 260;
-	options->float_window_h = 450;
-	options->float_window_x = 0;
-	options->float_window_y = 0;
-	options->float_window_divider = -1;
+	options->layout.float_window.w = 260;
+	options->layout.float_window.h = 450;
+	options->layout.float_window.x = 0;
+	options->layout.float_window.y = 0;
+	options->layout.float_window.vdivider_pos = -1;
 	
-	options->window_hdivider_pos = -1;
-	options->window_vdivider_pos = 200;
+	options->layout.main_window.hdivider_pos = -1;
+	options->layout.main_window.vdivider_pos = 200;
 	
-	options->save_window_positions = FALSE;
-	options->tools_float = FALSE;
-	options->tools_hidden = FALSE;
-	options->toolbar_hidden = FALSE;
+	options->layout.save_window_positions = FALSE;
+	options->layout.tools_float = FALSE;
+	options->layout.tools_hidden = FALSE;
+	options->layout.toolbar_hidden = FALSE;
 	options->progressive_key_scrolling = FALSE;
 	
 	options->startup_path_enable = FALSE;
@@ -49,7 +49,7 @@
 	options->safe_delete_enable = FALSE;
 	options->safe_delete_path = NULL;
 	options->safe_delete_size = 128;
-	options->restore_tool = FALSE;
+	options->layout.tools_restore_state = FALSE;
 	options->image.zoom_mode = ZOOM_RESET_ORIGINAL;
 	options->image.zoom_2pass = TRUE;
 	options->image.scroll_reset_method = SCROLL_RESET_TOPLEFT;
--- a/src/layout.c	Sat Apr 12 17:20:34 2008 +0000
+++ b/src/layout.c	Sat Apr 12 19:33:59 2008 +0000
@@ -1258,8 +1258,8 @@
 
 static void layout_tools_geometry_sync(LayoutWindow *lw)
 {
-	layout_geometry_get_tools(lw, &options->float_window_x, &options->float_window_x,
-				  &options->float_window_w, &options->float_window_h, &lw->div_float);
+	layout_geometry_get_tools(lw, &options->layout.float_window.x, &options->layout.float_window.x,
+				  &options->layout.float_window.w, &options->layout.float_window.h, &lw->div_float);
 }
 
 static void layout_tools_hide(LayoutWindow *lw, gint hide)
@@ -1322,7 +1322,7 @@
 				 G_CALLBACK(layout_tools_delete_cb), lw);
 		layout_keyboard_init(lw, lw->tools);
 
-		if (options->save_window_positions)
+		if (options->layout.save_window_positions)
 			{
 			hints = GDK_HINT_USER_POS;
 			}
@@ -1378,10 +1378,10 @@
 
 	if (new_window)
 		{
-		if (options->save_window_positions)
+		if (options->layout.save_window_positions)
 			{
-			gtk_window_set_default_size(GTK_WINDOW(lw->tools), options->float_window_w, options->float_window_h);
-			gtk_window_move(GTK_WINDOW(lw->tools), options->float_window_x, options->float_window_y);
+			gtk_window_set_default_size(GTK_WINDOW(lw->tools), options->layout.float_window.w, options->layout.float_window.h);
+			gtk_window_move(GTK_WINDOW(lw->tools), options->layout.float_window.x, options->layout.float_window.y);
 			}
 		else
 			{
@@ -1398,7 +1398,7 @@
 			}
 		}
 
-	if (!options->save_window_positions)
+	if (!options->layout.save_window_positions)
 		{
 		if (vertical)
 			{
@@ -1886,7 +1886,7 @@
 	lw->tools_float = popped;
 	lw->tools_hidden = hidden;
 
-	lw->toolbar_hidden = options->toolbar_hidden;
+	lw->toolbar_hidden = options->layout.toolbar_hidden;
 
 	lw->utility_box = NULL;
 	lw->bar_sort = NULL;
@@ -1907,11 +1907,11 @@
 
 	/* divider positions */
 
-	if (options->save_window_positions)
+	if (options->layout.save_window_positions)
 		{
-		lw->div_h = options->window_hdivider_pos;
-		lw->div_v = options->window_vdivider_pos;
-		lw->div_float = options->float_window_divider;
+		lw->div_h = options->layout.main_window.hdivider_pos;
+		lw->div_v = options->layout.main_window.vdivider_pos;
+		lw->div_float = options->layout.float_window.vdivider_pos;
 		}
 	else
 		{
@@ -1926,7 +1926,7 @@
 	gtk_window_set_resizable(GTK_WINDOW(lw->window), TRUE);
 	gtk_container_set_border_width(GTK_CONTAINER(lw->window), 0);
 
-	if (options->save_window_positions)
+	if (options->layout.save_window_positions)
 		{
 		hint_mask = GDK_HINT_USER_POS;
 		}
@@ -1942,13 +1942,13 @@
 	gtk_window_set_geometry_hints(GTK_WINDOW(lw->window), NULL, &hint,
 				      GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE | hint_mask);
 
-	if (options->save_window_positions)
+	if (options->layout.save_window_positions)
 		{
-		gtk_window_set_default_size(GTK_WINDOW(lw->window), options->main_window_w, options->main_window_h);
+		gtk_window_set_default_size(GTK_WINDOW(lw->window), options->layout.main_window.w, options->layout.main_window.h);
 		if (!layout_window_list)
 			{
-			gtk_window_move(GTK_WINDOW(lw->window), options->main_window_x, options->main_window_y);
-			if (options->main_window_maximized) gtk_window_maximize(GTK_WINDOW(lw->window));
+			gtk_window_move(GTK_WINDOW(lw->window), options->layout.main_window.x, options->layout.main_window.y);
+			if (options->layout.main_window.maximized) gtk_window_maximize(GTK_WINDOW(lw->window));
 			}
 		}
 	else
--- a/src/main.c	Sat Apr 12 17:20:34 2008 +0000
+++ b/src/main.c	Sat Apr 12 19:33:59 2008 +0000
@@ -962,15 +962,15 @@
 			else if (strcmp(cmd_line, "+t") == 0 ||
 				 strcmp(cmd_line, "--with-tools") == 0)
 				{
-				options->tools_float = FALSE;
-				options->tools_hidden = FALSE;
+				options->layout.tools_float = FALSE;
+				options->layout.tools_hidden = FALSE;
 
 				remote_list = g_list_append(remote_list, "+t");
 				}
 			else if (strcmp(cmd_line, "-t") == 0 ||
 				 strcmp(cmd_line, "--without-tools") == 0)
 				{
-				options->tools_hidden = TRUE;
+				options->layout.tools_hidden = TRUE;
 
 				remote_list = g_list_append(remote_list, "-t");
 				}
@@ -1198,26 +1198,26 @@
 
 	if (layout_valid(&lw))
 		{
-		options->main_window_maximized =  window_maximized(lw->window);
-		if (!options->main_window_maximized)
+		options->layout.main_window.maximized =  window_maximized(lw->window);
+		if (!options->layout.main_window.maximized)
 			{
-			layout_geometry_get(NULL, &options->main_window_x, &options->main_window_y,
-					    &options->main_window_w, &options->main_window_h);
+			layout_geometry_get(NULL, &options->layout.main_window.x, &options->layout.main_window.y,
+					    &options->layout.main_window.w, &options->layout.main_window.h);
 			}
 		options->fullscreen.show_info = image_osd_get(lw->image, NULL, NULL);
 		}
 
-	layout_geometry_get_dividers(NULL, &options->window_hdivider_pos, &options->window_vdivider_pos);
+	layout_geometry_get_dividers(NULL, &options->layout.main_window.hdivider_pos, &options->layout.main_window.vdivider_pos);
 
 	layout_views_get(NULL, &options->layout.view_as_tree, &options->layout.view_as_icons);
 
 	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,
-				  &options->float_window_w, &options->float_window_h, &options->float_window_divider);
-	layout_tools_float_get(NULL, &options->tools_float, &options->tools_hidden);
-	options->toolbar_hidden = layout_toolbar_hidden(NULL);
+	layout_geometry_get_tools(NULL, &options->layout.float_window.x, &options->layout.float_window.y,
+				  &options->layout.float_window.w, &options->layout.float_window.h, &options->layout.float_window.vdivider_pos);
+	layout_tools_float_get(NULL, &options->layout.tools_float, &options->layout.tools_hidden);
+	options->layout.toolbar_hidden = layout_toolbar_hidden(NULL);
 
 	options->color_profile.enabled = layout_image_color_profile_get_use(NULL);
 	layout_image_color_profile_get(NULL,
@@ -1393,7 +1393,7 @@
 		path = get_current_dir();
 		}
 
-	lw = layout_new_with_geometry(NULL, options->tools_float, options->tools_hidden, geometry);
+	lw = layout_new_with_geometry(NULL, options->layout.tools_float, options->layout.tools_hidden, geometry);
 	layout_sort_set(lw, options->file_sort.method, options->file_sort.ascending);
 
 	if (collection_list && !startup_command_line_collection)
--- a/src/preferences.c	Sat Apr 12 17:20:34 2008 +0000
+++ b/src/preferences.c	Sat Apr 12 19:33:59 2008 +0000
@@ -187,8 +187,8 @@
 	options->enable_delete_key = c_options->enable_delete_key;
 	options->safe_delete_enable = c_options->safe_delete_enable;
 	options->safe_delete_size = c_options->safe_delete_size;
-	options->restore_tool = c_options->restore_tool;
-	options->save_window_positions = c_options->save_window_positions;
+	options->layout.tools_restore_state = c_options->layout.tools_restore_state;
+	options->layout.save_window_positions = c_options->layout.save_window_positions;
 	options->image.zoom_mode = c_options->image.zoom_mode;
 	options->image.zoom_2pass = c_options->image.zoom_2pass;
 	options->image.fit_window_to_image = c_options->image.fit_window_to_image;
@@ -954,9 +954,9 @@
 	group = pref_group_new(vbox, FALSE, _("State"), GTK_ORIENTATION_VERTICAL);
 
 	pref_checkbox_new_int(group, _("Remember window positions"),
-			      options->save_window_positions, &c_options->save_window_positions);
+			      options->layout.save_window_positions, &c_options->layout.save_window_positions);
 	pref_checkbox_new_int(group, _("Remember tool state (float/hidden)"),
-			      options->restore_tool, &c_options->restore_tool);
+			      options->layout.tools_restore_state, &c_options->layout.tools_restore_state);
 
 	group = pref_group_new(vbox, FALSE, _("Size"), GTK_ORIENTATION_VERTICAL);
 
--- a/src/rcfile.c	Sat Apr 12 17:20:34 2008 +0000
+++ b/src/rcfile.c	Sat Apr 12 19:33:59 2008 +0000
@@ -299,12 +299,6 @@
 	write_int_option(ssi, "custom_similarity_threshold", options->dupe_custom_threshold);
 	secure_fputc(ssi, '\n');
 
-	write_bool_option(ssi, "tools_float", options->tools_float);
-	write_bool_option(ssi, "tools_hidden", options->tools_hidden);
-	write_bool_option(ssi, "restore_tool_state", options->restore_tool);
-	write_bool_option(ssi, "toolbar_hidden", options->toolbar_hidden);
-	secure_fputc(ssi, '\n');
-
 	write_bool_option(ssi, "mouse_wheel_scrolls", options->mousewheel_scrolls);
 	write_bool_option(ssi, "in_place_rename", options->enable_in_place_rename);
 	write_int_option(ssi, "open_recent_max", options->recent_list_max);
@@ -321,6 +315,33 @@
 	write_char_option(ssi, "layout.order", options->layout.order);
 	write_bool_option(ssi, "layout.view_as_icons", options->layout.view_as_icons);
 	write_bool_option(ssi, "layout.view_as_tree", options->layout.view_as_tree);
+	secure_fputc(ssi, '\n');
+
+	write_bool_option(ssi, "layout.save_window_positions", options->layout.save_window_positions);
+	secure_fputc(ssi, '\n');
+
+	write_int_option(ssi, "layout.main_window.x", options->layout.main_window.x);
+	write_int_option(ssi, "layout.main_window.y", options->layout.main_window.y);
+	write_int_option(ssi, "layout.main_window.w", options->layout.main_window.w);
+	write_int_option(ssi, "layout.main_window.h", options->layout.main_window.h);
+	write_bool_option(ssi, "layout.main_window.maximized", options->layout.main_window.maximized);
+	write_int_option(ssi, "layout.main_window.hdivider_pos", options->layout.main_window.hdivider_pos);
+	write_int_option(ssi, "layout.main_window.vdivider_pos", options->layout.main_window.vdivider_pos);
+	secure_fputc(ssi, '\n');
+
+	write_int_option(ssi, "layout.float_window.x", options->layout.float_window.x);
+	write_int_option(ssi, "layout.float_window.y", options->layout.float_window.y);
+	write_int_option(ssi, "layout.float_window.w", options->layout.float_window.w);
+	write_int_option(ssi, "layout.float_window.h", options->layout.float_window.h);
+	write_int_option(ssi, "layout.float_window.vdivider_pos", options->layout.float_window.vdivider_pos);
+	secure_fputc(ssi, '\n');
+
+	write_bool_option(ssi, "layout.tools_float", options->layout.tools_float);
+	write_bool_option(ssi, "layout.tools_hidden", options->layout.tools_hidden);
+	write_bool_option(ssi, "layout.tools_restore_state", options->layout.tools_restore_state);
+	secure_fputc(ssi, '\n');
+
+	write_bool_option(ssi, "layout.toolbar_hidden", options->layout.toolbar_hidden);
 
 
 	secure_fprintf(ssi, "\n##### Image Options #####\n\n");
@@ -331,6 +352,8 @@
 	if (options->image.zoom_mode == ZOOM_RESET_NONE) secure_fprintf(ssi, "dont_change\n");
 	write_bool_option(ssi, "image.zoom_2pass", options->image.zoom_2pass);
 	write_bool_option(ssi, "image.zoom_to_fit_allow_expand", options->image.zoom_to_fit_allow_expand);
+	write_int_option(ssi, "image.zoom_quality", options->image.zoom_quality);
+	write_int_option(ssi, "image.zoom_increment", options->image.zoom_increment);
 	write_bool_option(ssi, "image.fit_window_to_image", options->image.fit_window_to_image);
 	write_bool_option(ssi, "image.limit_window_size", options->image.limit_window_size);
 	write_int_option(ssi, "image.max_window_size", options->image.max_window_size);
@@ -338,9 +361,7 @@
 	write_int_option(ssi, "image.max_autofit_size", options->image.max_autofit_size);
 	write_int_option(ssi, "image.scroll_reset_method", options->image.scroll_reset_method);
 	write_int_option(ssi, "image.tile_cache_max", options->image.tile_cache_max);
-	write_int_option(ssi, "image.zoom_quality", options->image.zoom_quality);
 	write_int_option(ssi, "image.dither_quality", options->image.dither_quality);
-	write_int_option(ssi, "image.zoom_increment", options->image.zoom_increment);
 	write_bool_option(ssi, "image.enable_read_ahead", options->image.enable_read_ahead);
 	write_bool_option(ssi, "image.exif_rotate_enable", options->image.exif_rotate_enable);
 
@@ -381,15 +402,25 @@
 	write_bool_option(ssi, "slideshow.repeat", options->slideshow.repeat);
 
 
+	secure_fprintf(ssi, "\n##### Collection Options #####\n\n");
+
+	write_bool_option(ssi, "collections.rectangular_selection", options->collections.rectangular_selection);
+
+
 	secure_fprintf(ssi, "\n##### Filtering Options #####\n\n");
 
 	write_bool_option(ssi, "file_filter.show_dot_files", options->file_filter.show_dot_files);
 	write_bool_option(ssi, "file_filter.disable", options->file_filter.disable);
-	
+	secure_fputc(ssi, '\n');
+
 	filter_write_list(ssi);
 	
+
+	secure_fprintf(ssi, "\n##### Sidecars Options #####\n\n");
+
 	sidecar_ext_write(ssi);
 
+
 	secure_fprintf(ssi, "\n##### Color Profiles #####\n\n");
 
 #ifndef HAVE_LCMS
@@ -400,6 +431,8 @@
 	write_bool_option(ssi, "color_profile.enabled", options->color_profile.enabled);
 	write_bool_option(ssi, "color_profile.use_image", options->color_profile.use_image);
 	write_int_option(ssi, "color_profile.input_type", options->color_profile.input_type);
+	secure_fputc(ssi, '\n');
+
 	for (i = 0; i < COLOR_PROFILE_INPUTS; i++)
 		{
 		gchar *buf;
@@ -429,26 +462,6 @@
 		g_free(qcommand);
 		}
 
-	secure_fprintf(ssi, "\n##### Collection Options #####\n\n");
-
-	write_bool_option(ssi, "collections.rectangular_selection", options->collections.rectangular_selection);
-
-	secure_fprintf(ssi, "\n##### Window Positions #####\n\n");
-
-	write_bool_option(ssi, "restore_window_positions", options->save_window_positions);
-	secure_fputc(ssi, '\n');
-	write_int_option(ssi, "main_window_x", options->main_window_x);
-	write_int_option(ssi, "main_window_y", options->main_window_y);
-	write_int_option(ssi, "main_window_width", options->main_window_w);
-	write_int_option(ssi, "main_window_height", options->main_window_h);
-	write_bool_option(ssi, "main_window_maximized", options->main_window_maximized);
-	write_int_option(ssi, "float_window_x", options->float_window_x);
-	write_int_option(ssi, "float_window_y", options->float_window_y);
-	write_int_option(ssi, "float_window_width", options->float_window_w);
-	write_int_option(ssi, "float_window_height", options->float_window_h);
-	write_int_option(ssi, "float_window_divider", options->float_window_divider);
-	write_int_option(ssi, "divider_position_h", options->window_hdivider_pos);
-	write_int_option(ssi, "divider_position_v", options->window_vdivider_pos);
 
 	secure_fprintf(ssi, "\n##### Exif #####\n# 0: never\n# 1: if set\n# 2: always\n\n");
 	for (i = 0; ExifUIList[i].key; i++)
@@ -529,7 +542,7 @@
 		strncpy(option, s_buf, sizeof(option));
 		strncpy(value, s_buf_ptr, sizeof(value));
 
-		/* general options */
+		/* layout options */
 
 		options->layout.style = read_int_option(f, option,
 			"layout.style", value, options->layout.style);
@@ -539,6 +552,46 @@
 			"layout.view_as_icons", value, options->layout.view_as_icons);
 		options->layout.view_as_tree = read_bool_option(f, option,
 			"layout.view_as_tree", value, options->layout.view_as_tree);
+		/* window positions */
+
+		options->layout.save_window_positions = read_bool_option(f, option,
+			"layout.save_window_positions", value, options->layout.save_window_positions);
+
+		options->layout.main_window.x = read_int_option(f, option,
+			"layout.main_window.x", value, options->layout.main_window.x);
+		options->layout.main_window.y = read_int_option(f, option,
+			"layout.main_window.y", value, options->layout.main_window.y);
+		options->layout.main_window.w = read_int_option(f, option,
+			"layout.main_window.w", value, options->layout.main_window.w);
+		options->layout.main_window.h = read_int_option(f, option,
+			"layout.main_window.h", value, options->layout.main_window.h);
+		options->layout.main_window.maximized = read_bool_option(f, option,
+			"layout.main_window.maximized", value, options->layout.main_window.maximized);
+		options->layout.float_window.x = read_int_option(f, option,
+			"layout.float_window.x", value, options->layout.float_window.x);
+		options->layout.float_window.y = read_int_option(f, option,
+			"layout.float_window.y", value, options->layout.float_window.y);
+		options->layout.float_window.w = read_int_option(f, option,
+			"layout.float_window.w", value, options->layout.float_window.w);
+		options->layout.float_window.h = read_int_option(f, option,
+			"layout.float_window.h", value, options->layout.float_window.h);
+		options->layout.float_window.vdivider_pos = read_int_option(f, option,
+			"layout.float_window.vdivider_pos", value, options->layout.float_window.vdivider_pos);
+		options->layout.main_window.hdivider_pos = read_int_option(f, option,
+			"layout.main_window.hdivider_pos", value,options->layout.main_window.hdivider_pos);
+		options->layout.main_window.vdivider_pos = read_int_option(f, option,
+			"layout.main_window.vdivider_pos", value, options->layout.main_window.vdivider_pos);
+		options->layout.tools_float = read_bool_option(f, option,
+			"layout.tools_float", value, options->layout.tools_float);
+		options->layout.tools_hidden = read_bool_option(f, option,
+			"layout.tools_hidden", value, options->layout.tools_hidden);
+		options->layout.tools_restore_state = read_bool_option(f, option,
+			"layout.tools_restore_state", value, options->layout.tools_restore_state);
+		options->layout.toolbar_hidden = read_bool_option(f, option,
+			"layout.toolbar_hidden", value, options->layout.toolbar_hidden);
+
+
+		/* general options */
 		options->show_icon_names = read_bool_option(f, option,
 			"show_icon_names", value, options->show_icon_names);
 
@@ -554,6 +607,7 @@
 		options->startup_path = read_char_option(f, option,
 			"startup_path", value_all, options->startup_path);
 
+		/* image options */
 		if (strcasecmp(option, "image.zoom_mode") == 0)
                         {
                         if (strcasecmp(value, "original") == 0) options->image.zoom_mode = ZOOM_RESET_ORIGINAL;
@@ -593,6 +647,7 @@
 			"progressive_keyboard_scrolling", value, options->progressive_key_scrolling);
 
 
+		/* thumbnails options */
 		options->thumbnails.enabled = read_bool_option(f, option,
 			"thumbnails.enabled", value, options->thumbnails.enabled);
 		options->thumbnails.max_width = read_int_option(f, option,
@@ -617,6 +672,7 @@
 		options->enable_metadata_dirs = read_bool_option(f, option,
 			"local_metadata", value, options->enable_metadata_dirs);
 
+		/* file sorting options */
 		options->file_sort.method = (SortType)read_int_option(f, option,
 			"file_sort.method", value, (gint)options->file_sort.method);
 		options->file_sort.ascending = read_bool_option(f, option,
@@ -635,16 +691,6 @@
 		options->safe_delete_size = read_int_option(f, option,
 			"safe_delete_size", value,options->safe_delete_size);
 
-		options->tools_float = read_bool_option(f, option,
-			"tools_float", value, options->tools_float);
-		options->tools_hidden = read_bool_option(f, option,
-			"tools_hidden", value, options->tools_hidden);
-		options->restore_tool = read_bool_option(f, option,
-			"restore_tool_state", value, options->restore_tool);
-
-		options->toolbar_hidden = read_bool_option(f, option,
-			"toolbar_hidden", value, options->toolbar_hidden);
-
 		options->mousewheel_scrolls = read_bool_option(f, option,
 			"mouse_wheel_scrolls", value, options->mousewheel_scrolls);
 		options->enable_in_place_rename = read_bool_option(f, option,
@@ -753,41 +799,11 @@
 				}
 			}
 
-		/* colection options */
+		/* collection options */
 
 		options->collections.rectangular_selection = read_bool_option(f, option,
 			"collections.rectangular_selection", value, options->collections.rectangular_selection);
 
-		/* window positions */
-
-		options->save_window_positions = read_bool_option(f, option,
-			"restore_window_positions", value, options->save_window_positions);
-
-		options->main_window_x = read_int_option(f, option,
-			"main_window_x", value, options->main_window_x);
-		options->main_window_y = read_int_option(f, option,
-			"main_window_y", value, options->main_window_y);
-		options->main_window_w = read_int_option(f, option,
-			"main_window_width", value, options->main_window_w);
-		options->main_window_h = read_int_option(f, option,
-			"main_window_height", value, options->main_window_h);
-		options->main_window_maximized = read_bool_option(f, option,
-			"main_window_maximized", value, options->main_window_maximized);
-		options->float_window_x = read_int_option(f, option,
-			"float_window_x", value, options->float_window_x);
-		options->float_window_y = read_int_option(f, option,
-			"float_window_y", value, options->float_window_y);
-		options->float_window_w = read_int_option(f, option,
-			"float_window_width", value, options->float_window_w);
-		options->float_window_h = read_int_option(f, option,
-			"float_window_height", value, options->float_window_h);
-		options->float_window_divider = read_int_option(f, option,
-			"float_window_divider", value, options->float_window_divider);
-		options->window_hdivider_pos = read_int_option(f, option,
-			"divider_position_h", value,options-> window_hdivider_pos);
-		options->window_vdivider_pos = read_int_option(f, option,
-			"divider_position_v", value, options->window_vdivider_pos);
-
 		if (0 == strncasecmp(option, "exif_", 5))
 			{
 			for (i = 0; ExifUIList[i].key; i++)
--- a/src/typedefs.h	Sat Apr 12 17:20:34 2008 +0000
+++ b/src/typedefs.h	Sat Apr 12 19:33:59 2008 +0000
@@ -731,27 +731,6 @@
 
 struct _ConfOptions
 {
-	/* windows */
-	gint main_window_w;
-	gint main_window_h;
-	gint main_window_x;
-	gint main_window_y;
-	gint main_window_maximized;
-
-	gint float_window_w;
-	gint float_window_h;
-	gint float_window_x;
-	gint float_window_y;
-	gint float_window_divider;
-
-	gint window_hdivider_pos;
-	gint window_vdivider_pos;
-
-	gint save_window_positions;
-
-	gint tools_float;
-	gint tools_hidden;
-	gint toolbar_hidden;
 
 	/* ui */
 	gint progressive_key_scrolling;
@@ -775,8 +754,7 @@
 	gint safe_delete_enable;
 	gchar *safe_delete_path;
 	gint safe_delete_size;
-	gint restore_tool;
-
+	
 	gint dupe_custom_threshold;
 
 	gint recent_list_max;
@@ -864,6 +842,33 @@
 
 		gint view_as_icons;
 		gint view_as_tree;
+
+		struct {
+			gint w;
+			gint h;
+			gint x;
+			gint y;
+			gint maximized;
+			gint hdivider_pos;
+			gint vdivider_pos;
+		} main_window;
+
+		struct {
+			gint w;
+			gint h;
+			gint x;
+			gint y;
+			gint vdivider_pos;
+		} float_window;
+
+		gint save_window_positions;
+
+		gint tools_float;
+		gint tools_hidden;
+		gint tools_restore_state;
+
+		gint toolbar_hidden;
+
 	} layout;
 
 	/* color profiles */