comparison src/rcfile.c @ 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
comparison
equal deleted inserted replaced
741:0e8b802e54d5 742:a336b5545af6
290 *----------------------------------------------------------------------------- 290 *-----------------------------------------------------------------------------
291 * save configuration (public) 291 * save configuration (public)
292 *----------------------------------------------------------------------------- 292 *-----------------------------------------------------------------------------
293 */ 293 */
294 294
295 static gboolean save_options_to(const gchar *utf8_path) 295 static gboolean save_options_to(const gchar *utf8_path, ConfOptions *options)
296 { 296 {
297 SecureSaveInfo *ssi; 297 SecureSaveInfo *ssi;
298 gchar *rc_pathl; 298 gchar *rc_pathl;
299 gint i; 299 gint i;
300 300
592 } 592 }
593 593
594 return TRUE; 594 return TRUE;
595 } 595 }
596 596
597 void save_options(void) 597 void save_options(ConfOptions *options)
598 { 598 {
599 gchar *rc_path; 599 gchar *rc_path;
600 600
601 rc_path = g_build_filename(homedir(), GQ_RC_DIR, RC_FILE_NAME, NULL); 601 rc_path = g_build_filename(homedir(), GQ_RC_DIR, RC_FILE_NAME, NULL);
602 save_options_to(rc_path); 602 save_options_to(rc_path, options);
603 g_free(rc_path); 603 g_free(rc_path);
604 } 604 }
605 605
606 606
607 607
628 return TRUE; 628 return TRUE;
629 } 629 }
630 630
631 631
632 632
633 static gboolean load_options_from(const gchar *utf8_path) 633 static gboolean load_options_from(const gchar *utf8_path, ConfOptions *options)
634 { 634 {
635 FILE *f; 635 FILE *f;
636 gchar *rc_pathl; 636 gchar *rc_pathl;
637 gchar s_buf[1024]; 637 gchar s_buf[1024];
638 gchar option[1024]; 638 gchar option[1024];
920 920
921 fclose(f); 921 fclose(f);
922 return TRUE; 922 return TRUE;
923 } 923 }
924 924
925 void load_options(void) 925 void load_options(ConfOptions *options)
926 { 926 {
927 gchar *rc_path; 927 gchar *rc_path;
928 928
929 rc_path = g_build_filename(homedir(), GQ_RC_DIR, RC_FILE_NAME, NULL); 929 rc_path = g_build_filename(homedir(), GQ_RC_DIR, RC_FILE_NAME, NULL);
930 load_options_from(rc_path); 930 load_options_from(rc_path, options);
931 g_free(rc_path); 931 g_free(rc_path);
932 } 932 }