Mercurial > pidgin.yaz
comparison src/prefs.c @ 5529:e7747cae9710
[gaim-migrate @ 5929]
Fixed some bugs on loading, and added a couple default keys.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 26 May 2003 07:06:20 +0000 |
parents | 156e65ca910f |
children | b4c32b9a797d |
comparison
equal
deleted
inserted
replaced
5528:c72213437829 | 5529:e7747cae9710 |
---|---|
64 NULL, NULL, NULL }; | 64 NULL, NULL, NULL }; |
65 | 65 |
66 void gaim_prefs_init() { | 66 void gaim_prefs_init() { |
67 prefs_hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); | 67 prefs_hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); |
68 | 68 |
69 gaim_prefs_add_none("/core"); | |
70 | |
69 /* XXX: this is where you would want to put prefs declarations */ | 71 /* XXX: this is where you would want to put prefs declarations */ |
70 } | 72 } |
71 | 73 |
72 static char *pref_full_name(struct gaim_pref *pref) { | 74 static char *pref_full_name(struct gaim_pref *pref) { |
73 GString *name; | 75 GString *name; |
510 if(!pref_name || !strcmp(pref_name, "/")) | 512 if(!pref_name || !strcmp(pref_name, "/")) |
511 return; | 513 return; |
512 | 514 |
513 pref_name_full = g_string_new(pref_name); | 515 pref_name_full = g_string_new(pref_name); |
514 | 516 |
515 for(tmp = prefs_stack; tmp; tmp = tmp->prev) { | 517 for(tmp = prefs_stack; tmp; tmp = tmp->next) { |
516 pref_name_full = g_string_prepend_c(pref_name_full, '/'); | 518 pref_name_full = g_string_prepend_c(pref_name_full, '/'); |
517 pref_name_full = g_string_prepend(pref_name_full, tmp->data); | 519 pref_name_full = g_string_prepend(pref_name_full, tmp->data); |
518 } | 520 } |
519 | 521 |
520 pref_name_full = g_string_prepend_c(pref_name_full, '/'); | 522 pref_name_full = g_string_prepend_c(pref_name_full, '/'); |
521 | 523 |
522 if(find_pref(pref_name_full->str)) { | 524 if(!find_pref(pref_name_full->str)) { |
523 switch(pref_type) { | 525 switch(pref_type) { |
524 case GAIM_PREF_NONE: | 526 case GAIM_PREF_NONE: |
525 gaim_prefs_add_none(pref_name_full->str); | 527 gaim_prefs_add_none(pref_name_full->str); |
526 break; | 528 break; |
527 case GAIM_PREF_BOOLEAN: | 529 case GAIM_PREF_BOOLEAN: |