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
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue