changeset 742:a336b5545af6

Pass ConfOptions * to save_options() and load_options().
author zas_
date Thu, 22 May 2008 23:22:12 +0000
parents 0e8b802e54d5
children 77ff94c0490a
files src/main.c src/rcfile.c src/rcfile.h
diffstat 3 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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);
 
--- 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);
 }
--- 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