Mercurial > pidgin
diff src/prefs.c @ 5545:7a64114641c3
[gaim-migrate @ 5946]
I've been rewriting the prefs to move from gaimrc to prefs.xml. This will
NOT compile! I don't want to see complaints about this, as it's CVS, and
you should only be using it if you can put up with things like this. Also,
don't ask how long it'll take until it compiles again. It may be several
days. This is a big migration. Even when it works, it may not run right.
However, it's made a lot of progress, and I plan to actively work on it
today and tomorrow.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 29 May 2003 19:10:24 +0000 |
parents | de09863bd4b5 |
children | 90a67ea697f7 |
line wrap: on
line diff
--- a/src/prefs.c Thu May 29 17:35:28 2003 +0000 +++ b/src/prefs.c Thu May 29 19:10:24 2003 +0000 @@ -97,8 +97,55 @@ gaim_prefs_add_none("/core"); /* XXX: this is where you would want to put prefs declarations */ + + /* Away */ + gaim_prefs_add_none("/core/away"); + gaim_prefs_add_bool("/core/away/queue_messages", FALSE); + gaim_prefs_add_bool("/core/away/away_when_idle", TRUE); + + /* Away -> Auto Response */ + gaim_prefs_add_none("/core/away/auto_response"); + gaim_prefs_add_bool("/core/away/auto_response/enabled", TRUE); + gaim_prefs_add_bool("/core/away/auto_response/in_active_conv", TRUE); + gaim_prefs_add_bool("/core/away/auto_response/idle_only", FALSE); + + /* Buddies */ + gaim_prefs_add_none("/core/buddies"); + gaim_prefs_add_bool("/core/buddies/use_server_alias", TRUE); + + /* Conversations */ gaim_prefs_add_none("/core/conversations"); gaim_prefs_add_bool("/core/conversations/send_urls_as_links", TRUE); + gaim_prefs_add_bool("/core/conversations/away_back_on_send", TRUE); + gaim_prefs_add_bool("/core/conversations/use_alias_for_title", TRUE); + gaim_prefs_add_bool("/core/conversations/combine_chat_im", FALSE); + + /* Conversations -> Chat */ + gaim_prefs_add_none("/core/conversations/chat"); + gaim_prefs_add_bool("/core/conversations/chat/show_join", TRUE); + gaim_prefs_add_bool("/core/conversations/chat/show_leave", TRUE); + gaim_prefs_add_bool("/core/conversations/chat/show_nick_change", TRUE); + + /* Conversations -> IM */ + gaim_prefs_add_none("/core/conversations/im"); + gaim_prefs_add_bool("/core/conversations/im/show_login", TRUE); + gaim_prefs_add_bool("/core/conversations/im/show_logoff", TRUE); + gaim_prefs_add_bool("/core/conversations/im/send_typing", TRUE); + + /* Proxy */ + gaim_prefs_add_none("/core/proxy"); + gaim_prefs_add_int("/core/proxy/type"); + + /* Sound */ + gaim_prefs_add_none("/core/sound"); + gaim_prefs_add_bool("/core/sound/command", FALSE); + gaim_prefs_add_bool("/core/sound/use_arts", FALSE); + gaim_prefs_add_bool("/core/sound/use_beep", FALSE); + gaim_prefs_add_bool("/core/sound/use_custom", FALSE); + gaim_prefs_add_bool("/core/sound/use_esd", FALSE); + gaim_prefs_add_bool("/core/sound/use_nas", TRUE); + gaim_prefs_add_bool("/core/sound/use_sys_default", TRUE); + gaim_prefs_add_bool("/core/sound/while_away", FALSE); } static char *pref_full_name(struct gaim_pref *pref) { @@ -370,7 +417,7 @@ return pref->value.integer; } -char *gaim_prefs_get_string(const char *name) { +const char *gaim_prefs_get_string(const char *name) { struct gaim_pref *pref = find_pref(name); g_return_val_if_fail(pref != NULL, NULL); @@ -596,7 +643,7 @@ NULL }; -void gaim_prefs_load() { +gboolean gaim_prefs_load() { gchar *filename = g_build_filename(gaim_user_dir(), "prefs.xml", NULL); gchar *contents = NULL; gsize length; @@ -606,7 +653,7 @@ if(!filename) { prefs_is_loaded = TRUE; - return; + return FALSE; } gaim_debug(GAIM_DEBUG_INFO, "prefs", "Reading %s\n", filename); @@ -616,7 +663,7 @@ error->message); g_error_free(error); prefs_is_loaded = TRUE; - return; + return FALSE; } context = g_markup_parse_context_new(&prefs_parser, 0, NULL, NULL); @@ -625,7 +672,7 @@ g_markup_parse_context_free(context); g_free(contents); prefs_is_loaded = TRUE; - return; + return FALSE; } if(!g_markup_parse_context_end_parse(context, NULL)) { @@ -633,7 +680,7 @@ g_markup_parse_context_free(context); g_free(contents); prefs_is_loaded = TRUE; - return; + return FALSE; } g_markup_parse_context_free(context); @@ -642,6 +689,7 @@ gaim_debug(GAIM_DEBUG_INFO, "prefs", "Finished reading %s\n", filename); g_free(filename); prefs_is_loaded = TRUE; + + return TRUE; } -