+
+void save_options(ConfOptions *options)
+{
+ gchar *rc_path;
+
+ sync_options_with_current_state(options);
+
+ rc_path = g_build_filename(homedir(), GQ_RC_DIR, RC_FILE_NAME, NULL);
+ save_options_to(rc_path, options);
+ g_free(rc_path);
+}
+
+void load_options(ConfOptions *options)
+{
+ gboolean success;
+ gchar *rc_path;
+
+ if (isdir(GQ_SYSTEM_WIDE_DIR))
+ {
+ rc_path = g_build_filename(GQ_SYSTEM_WIDE_DIR, RC_FILE_NAME, NULL);
+ success = load_options_from(rc_path, options);
+ DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed");
+ g_free(rc_path);
+ }
+
+ rc_path = g_build_filename(homedir(), GQ_RC_DIR, RC_FILE_NAME, NULL);
+ success = load_options_from(rc_path, options);
+ DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed");
+ g_free(rc_path);
+}