diff --git a/capplets/default-applications/ChangeLog b/capplets/default-applications/ChangeLog index 11f8e6374..b5e25928b 100644 --- a/capplets/default-applications/ChangeLog +++ b/capplets/default-applications/ChangeLog @@ -1,3 +1,10 @@ +2006-01-16 Rodrigo Moya + + * gnome-da-xml.c (gnome_da_xml_load_list): just read the file + from the $datadir we installed it. + + * Makefile.am: -DDATADIR. + 2006-01-16 Sebastien Bacher * Makefile.am: fixed the dist diff --git a/capplets/default-applications/Makefile.am b/capplets/default-applications/Makefile.am index 9c04f8102..d828fa02a 100644 --- a/capplets/default-applications/Makefile.am +++ b/capplets/default-applications/Makefile.am @@ -20,7 +20,12 @@ xmldatadir = $(datadir)/gnome-default-applications xmldata_DATA = $(xmldata_in_files:.xml.in=.xml) @INTLTOOL_XML_RULE@ -INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(DEFAULT_APPLICATIONS_CAPPLET_CFLAGS) -DGLADEDIR=\""$(gladedir)"\" +INCLUDES = \ + $(GNOMECC_CAPPLETS_CFLAGS) \ + $(DEFAULT_APPLICATIONS_CAPPLET_CFLAGS) \ + -DGLADEDIR=\""$(gladedir)"\" \ + -DDATADIR=\""$(datadir)"\" + noinst_DATA = gnome-default-applications.xml.in CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA) $(xmldata_DATA) EXTRA_DIST = $(glade_DATA) gnome-default-applications.xml.in diff --git a/capplets/default-applications/gnome-da-xml.c b/capplets/default-applications/gnome-da-xml.c index 89e4d32e4..8d1491d45 100644 --- a/capplets/default-applications/gnome-da-xml.c +++ b/capplets/default-applications/gnome-da-xml.c @@ -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");