Mercurial > pidgin
changeset 8671:d99d2572d1a9
[gaim-migrate @ 9423]
This is a feature requested by warren from the Fedora project. If a
/etc/gaim/prefs.xml file exists, and no $HOME/.gaim/prefs.xml exists,
/etc/gaim/prefs.xml will be read in. This is currently only enabled if Gaim
isn't compiled on Windows, and it really shouldn't cause any trouble.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 16 Apr 2004 04:39:03 +0000 |
parents | e72824b84285 |
children | 142108e89399 |
files | src/prefs.c |
diffstat | 1 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/prefs.c Fri Apr 16 02:53:40 2004 +0000 +++ b/src/prefs.c Fri Apr 16 04:39:03 2004 +0000 @@ -906,6 +906,31 @@ gaim_debug(GAIM_DEBUG_INFO, "prefs", "Reading %s\n", filename); if(!g_file_get_contents(filename, &contents, &length, &error)) { +#ifndef _WIN32 + g_free(filename); + g_error_free(error); + + error = NULL; + + /* + * We're hard-coding /etc here, which may not be great, but for + * now it works. This was requested by the Fedora guys for the + * upcoming FC2 release. + */ + filename = g_build_filename("/etc", "gaim", "prefs.xml", NULL); + + gaim_debug(GAIM_DEBUG_INFO, "prefs", "Reading %s\n", filename); + + if (!g_file_get_contents(filename, &contents, &length, &error)) { + gaim_debug(GAIM_DEBUG_ERROR, "prefs", "Error reading prefs: %s\n", + error->message); + g_error_free(error); + g_free(filename); + prefs_is_loaded = TRUE; + + return FALSE; + } +#else /* _WIN32 */ gaim_debug(GAIM_DEBUG_ERROR, "prefs", "Error reading prefs: %s\n", error->message); g_error_free(error); @@ -913,6 +938,7 @@ prefs_is_loaded = TRUE; return FALSE; +#endif /* _WIN32 */ } context = g_markup_parse_context_new(&prefs_parser, 0, NULL, NULL);