just read the file from the $datadir we installed it.

2006-01-16  Rodrigo Moya <rodrigo@novell.com>

	* gnome-da-xml.c (gnome_da_xml_load_list): just read the file
	from the $datadir we installed it.

	* Makefile.am: -DDATADIR.
This commit is contained in:
Rodrigo Moya 2006-01-16 17:59:03 +00:00 committed by Rodrigo Moya
parent 7683126997
commit 7b6f60b5bb
3 changed files with 21 additions and 18 deletions

View file

@ -182,26 +182,17 @@ gnome_da_xml_load_xml (GnomeDACapplet *capplet, const gchar * filename)
void
gnome_da_xml_load_list (GnomeDACapplet *capplet)
{
const char * const *xdg_dirs;
gint i;
gchar *filename;
xdg_dirs = g_get_system_data_dirs ();
if (xdg_dirs == NULL)
return;
filename = g_build_filename (DATADIR,
"gnome-default-applications",
"gnome-default-applications.xml",
NULL);
for (i = 0; i < G_N_ELEMENTS (xdg_dirs); i++) {
gchar *filename;
if (g_file_test (filename, G_FILE_TEST_EXISTS))
gnome_da_xml_load_xml (capplet, filename);
filename = g_build_filename (xdg_dirs[i],
"gnome-default-applications",
"gnome-default-applications.xml",
NULL);
if (g_file_test (filename, G_FILE_TEST_EXISTS))
gnome_da_xml_load_xml (capplet, filename);
g_free (filename);
}
g_free (filename);
if (capplet->web_browsers == NULL)
gnome_da_xml_load_xml (capplet, "./gnome-default-applications.xml");