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:
parent
7683126997
commit
7b6f60b5bb
3 changed files with 21 additions and 18 deletions
|
@ -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>
|
2006-01-16 Sebastien Bacher <seb128@debian.org>
|
||||||
|
|
||||||
* Makefile.am: fixed the dist
|
* Makefile.am: fixed the dist
|
||||||
|
|
|
@ -20,7 +20,12 @@ xmldatadir = $(datadir)/gnome-default-applications
|
||||||
xmldata_DATA = $(xmldata_in_files:.xml.in=.xml)
|
xmldata_DATA = $(xmldata_in_files:.xml.in=.xml)
|
||||||
@INTLTOOL_XML_RULE@
|
@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
|
noinst_DATA = gnome-default-applications.xml.in
|
||||||
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA) $(xmldata_DATA)
|
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA) $(xmldata_DATA)
|
||||||
EXTRA_DIST = $(glade_DATA) gnome-default-applications.xml.in
|
EXTRA_DIST = $(glade_DATA) gnome-default-applications.xml.in
|
||||||
|
|
|
@ -182,26 +182,17 @@ gnome_da_xml_load_xml (GnomeDACapplet *capplet, const gchar * filename)
|
||||||
void
|
void
|
||||||
gnome_da_xml_load_list (GnomeDACapplet *capplet)
|
gnome_da_xml_load_list (GnomeDACapplet *capplet)
|
||||||
{
|
{
|
||||||
const char * const *xdg_dirs;
|
gchar *filename;
|
||||||
gint i;
|
|
||||||
|
|
||||||
xdg_dirs = g_get_system_data_dirs ();
|
filename = g_build_filename (DATADIR,
|
||||||
if (xdg_dirs == NULL)
|
"gnome-default-applications",
|
||||||
return;
|
"gnome-default-applications.xml",
|
||||||
|
NULL);
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (xdg_dirs); i++) {
|
if (g_file_test (filename, G_FILE_TEST_EXISTS))
|
||||||
gchar *filename;
|
gnome_da_xml_load_xml (capplet, filename);
|
||||||
|
|
||||||
filename = g_build_filename (xdg_dirs[i],
|
g_free (filename);
|
||||||
"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);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (capplet->web_browsers == NULL)
|
if (capplet->web_browsers == NULL)
|
||||||
gnome_da_xml_load_xml (capplet, "./gnome-default-applications.xml");
|
gnome_da_xml_load_xml (capplet, "./gnome-default-applications.xml");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue