Move code from exit_program_final() to new sync_options_with_current_state().
authorLaurent Monin <geeqie@norz.org>
Thu, 22 May 2008 22:49:07 +0000 (22:49 +0000)
committerLaurent Monin <geeqie@norz.org>
Thu, 22 May 2008 22:49:07 +0000 (22:49 +0000)
src/main.c

index 08ca74c..e9e8409 100644 (file)
@@ -589,16 +589,10 @@ static void setup_default_options(void)
                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 @@ static void exit_program_final(void)
                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();