comparison src/options.c @ 1484:9c16a93a0fdf

improved sidebar configuration
author nadvornik
date Sun, 29 Mar 2009 14:20:44 +0000
parents 6e020d3ab168
children 1b2ddc6b2b27
comparison
equal deleted inserted replaced
1483:7cb24fdf07c0 1484:9c16a93a0fdf
245 gchar *rc_path; 245 gchar *rc_path;
246 246
247 sync_options_with_current_state(options); 247 sync_options_with_current_state(options);
248 248
249 rc_path = g_build_filename(get_rc_dir(), RC_FILE_NAME, NULL); 249 rc_path = g_build_filename(get_rc_dir(), RC_FILE_NAME, NULL);
250 save_options_to(rc_path, options); 250 save_config_to_file(rc_path, options);
251 g_free(rc_path); 251 g_free(rc_path);
252 } 252 }
253 253
254 gboolean load_options(ConfOptions *options) 254 gboolean load_options(ConfOptions *options)
255 { 255 {
257 gchar *rc_path; 257 gchar *rc_path;
258 258
259 if (isdir(GQ_SYSTEM_WIDE_DIR)) 259 if (isdir(GQ_SYSTEM_WIDE_DIR))
260 { 260 {
261 rc_path = g_build_filename(GQ_SYSTEM_WIDE_DIR, RC_FILE_NAME, NULL); 261 rc_path = g_build_filename(GQ_SYSTEM_WIDE_DIR, RC_FILE_NAME, NULL);
262 success = load_options_from(rc_path, options, TRUE); 262 success = load_config_from_file(rc_path, TRUE);
263 DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed"); 263 DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed");
264 g_free(rc_path); 264 g_free(rc_path);
265 } 265 }
266 266
267 rc_path = g_build_filename(get_rc_dir(), RC_FILE_NAME, NULL); 267 rc_path = g_build_filename(get_rc_dir(), RC_FILE_NAME, NULL);
268 success = load_options_from(rc_path, options, TRUE); 268 success = load_config_from_file(rc_path, TRUE);
269 DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed"); 269 DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed");
270 g_free(rc_path); 270 g_free(rc_path);
271 return(success); 271 return(success);
272 } 272 }
273 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ 273 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */