# HG changeset patch # User zas_ # Date 1211496547 0 # Node ID 3296f8d3a79bc502f196f65a77930cbebbf5220d # Parent ff8b802eac58005b9c7983894cff2fb06305dfa5 Move code from exit_program_final() to new sync_options_with_current_state(). diff -r ff8b802eac58 -r 3296f8d3a79b src/main.c --- 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();