# HG changeset patch # User zas_ # Date 1211498532 0 # Node ID a336b5545af6b989ec4fbc7dd0f197b8de37fc07 # Parent 0e8b802e54d553afb22b165d644dba8f71265416 Pass ConfOptions * to save_options() and load_options(). diff -r 0e8b802e54d5 -r a336b5545af6 src/main.c --- a/src/main.c Thu May 22 23:17:26 2008 +0000 +++ b/src/main.c Thu May 22 23:22:12 2008 +0000 @@ -544,7 +544,7 @@ 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 @@ 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); diff -r 0e8b802e54d5 -r a336b5545af6 src/rcfile.c --- a/src/rcfile.c Thu May 22 23:17:26 2008 +0000 +++ b/src/rcfile.c Thu May 22 23:22:12 2008 +0000 @@ -292,7 +292,7 @@ *----------------------------------------------------------------------------- */ -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 @@ 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 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 @@ 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); } diff -r 0e8b802e54d5 -r a336b5545af6 src/rcfile.h --- a/src/rcfile.h Thu May 22 23:17:26 2008 +0000 +++ b/src/rcfile.h Thu May 22 23:22:12 2008 +0000 @@ -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