# HG changeset patch # User Christian Hammond # Date 1082090343 0 # Node ID d99d2572d1a987c042b0db8639e2600f34f8a38b # Parent e72824b8428534b7f5bc59b8b53d4ea887ba0c7e [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 diff -r e72824b84285 -r d99d2572d1a9 src/prefs.c --- 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);