changeset 739:3296f8d3a79b

Move code from exit_program_final() to new sync_options_with_current_state().
author zas_
date Thu, 22 May 2008 22:49:07 +0000
parents ff8b802eac58
children 9b0ac8d58c89
files src/main.c
diffstat 1 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.c	Thu May 22 22:43:07 2008 +0000
+++ b/src/main.c	Thu May 22 22:49:07 2008 +0000
@@ -589,16 +589,10 @@
 		ExifUIList[i].current = ExifUIList[i].default_value;
 }
 
-static void exit_program_final(void)
+static void sync_options_with_current_state(void)
 {
-	gchar *path;
-	gchar *pathl;
 	LayoutWindow *lw = NULL;
 
-	remote_close(remote_connection);
-
-	collect_manager_flush();
-
 	if (layout_valid(&lw))
 		{
 		options->layout.main_window.maximized =  window_maximized(lw->window);
@@ -636,7 +630,18 @@
 		g_free(options->startup.path);
 		options->startup.path = g_strdup(layout_get_path(NULL));
 		}
+}
 
+static void exit_program_final(void)
+{
+	gchar *path;
+	gchar *pathl;
+
+	remote_close(remote_connection);
+
+	collect_manager_flush();
+
+	sync_options_with_current_state();
 	save_options();
 	keys_save();