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

@ -1,3 +1,10 @@
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.
2006-01-16 Sebastien Bacher <seb128@debian.org>
* Makefile.am: fixed the dist

View file

@ -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

View file

@ -182,17 +182,9 @@ 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;
xdg_dirs = g_get_system_data_dirs ();
if (xdg_dirs == NULL)
return;
for (i = 0; i < G_N_ELEMENTS (xdg_dirs); i++) {
gchar *filename;
filename = g_build_filename (xdg_dirs[i],
filename = g_build_filename (DATADIR,
"gnome-default-applications",
"gnome-default-applications.xml",
NULL);
@ -201,7 +193,6 @@ gnome_da_xml_load_list (GnomeDACapplet *capplet)
gnome_da_xml_load_xml (capplet, filename);
g_free (filename);
}
if (capplet->web_browsers == NULL)
gnome_da_xml_load_xml (capplet, "./gnome-default-applications.xml");