Pass ConfOptions * to save_options() and load_options().
authorLaurent Monin <geeqie@norz.org>
Thu, 22 May 2008 23:22:12 +0000 (23:22 +0000)
committerLaurent Monin <geeqie@norz.org>
Thu, 22 May 2008 23:22:12 +0000 (23:22 +0000)
src/main.c
src/rcfile.c
src/rcfile.h

index af1161b..13b9afd 100644 (file)
@@ -544,7 +544,7 @@ static void exit_program_final(void)
        collect_manager_flush();
 
        sync_options_with_current_state(options);
-       save_options();
+       save_options(options);
        keys_save();
 
        path = g_build_filename(homedir(), GQ_RC_DIR, "accels", NULL);
@@ -653,7 +653,7 @@ int main(int argc, char *argv[])
 
        options = init_options(NULL);
        setup_default_options(options);
-       load_options();
+       load_options(options);
 
        parse_command_line(argc, argv, &cmd_path, &cmd_file, &cmd_list, &collection_list, &geometry);
 
index d8a3e18..73734ea 100644 (file)
@@ -292,7 +292,7 @@ static gboolean read_bool_option(FILE *f, gchar *option, gchar *label, gchar *va
  *-----------------------------------------------------------------------------
  */
 
-static gboolean save_options_to(const gchar *utf8_path)
+static gboolean save_options_to(const gchar *utf8_path, ConfOptions *options)
 {
        SecureSaveInfo *ssi;
        gchar *rc_pathl;
@@ -594,12 +594,12 @@ static gboolean save_options_to(const gchar *utf8_path)
        return TRUE;
 }
 
-void save_options(void)
+void save_options(ConfOptions *options)
 {
        gchar *rc_path;
 
        rc_path = g_build_filename(homedir(), GQ_RC_DIR, RC_FILE_NAME, NULL);
-       save_options_to(rc_path);
+       save_options_to(rc_path, options);
        g_free(rc_path);
 }
 
@@ -630,7 +630,7 @@ static gboolean is_numbered_option(const gchar *option, const gchar *prefix, gin
 
 
 
-static gboolean load_options_from(const gchar *utf8_path)
+static gboolean load_options_from(const gchar *utf8_path, ConfOptions *options)
 {
        FILE *f;
        gchar *rc_pathl;
@@ -922,11 +922,11 @@ static gboolean load_options_from(const gchar *utf8_path)
        return TRUE;
 }
 
-void load_options(void)
+void load_options(ConfOptions *options)
 {
        gchar *rc_path;
 
        rc_path = g_build_filename(homedir(), GQ_RC_DIR, RC_FILE_NAME, NULL);
-       load_options_from(rc_path);
+       load_options_from(rc_path, options);
        g_free(rc_path);
 }
index 04609c1..325df3d 100644 (file)
@@ -17,8 +17,8 @@
 gchar *quoted_value(const gchar *text, const gchar **tail);
 gchar *escquote_value(const gchar *text);
 
-void save_options(void);
-void load_options(void);
+void save_options(ConfOptions *options);
+void load_options(ConfOptions *options);
 
 
 #endif