summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Tarricone <brian@tarricone.org>2004-12-03 05:40:05 +0000
committerBrian Tarricone <brian@tarricone.org>2004-12-03 05:40:05 +0000
commit92ff02274cf9f7355bbcab17b7c61ce0b8d9ec1f (patch)
treed81d964baa30a12ff1902d7f30bbae09ee9a53ba
parentd89c80dc24368b21e20f1f77e652e8885a87054c (diff)
downloadxfdesktop-92ff02274cf9f7355bbcab17b7c61ce0b8d9ec1f.tar.gz
when including menu files, use xfce_resource_lookup() instead of
xfce_get_userfile() if the file is relative. (Old svn revision: 7991)
-rw-r--r--modules/menu/desktop-menu-file.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/modules/menu/desktop-menu-file.c b/modules/menu/desktop-menu-file.c
index 463bc327..21530de2 100644
--- a/modules/menu/desktop-menu-file.c
+++ b/modules/menu/desktop-menu-file.c
@@ -508,11 +508,18 @@ menu_file_xml_start(GMarkupParseContext *context, const gchar *element_name,
attribute_values[j], state->cur_branch,
state->cur_path, FALSE, FALSE);
} else {
- gchar *menuincfile = xfce_get_userfile(attribute_values[j],
- NULL);
- desktop_menu_file_parse(state->desktop_menu, menuincfile,
- state->cur_branch, state->cur_path, FALSE, FALSE);
- g_free(menuincfile);
+ gchar tmp[PATH_MAX];
+ gchar *menuincfile;
+
+ g_snprintf(tmp, PATH_MAX, "xfce4/desktop/%s",
+ attribute_values[j]);
+ menuincfile = xfce_resource_lookup(XFCE_RESOURCE_CONFIG, tmp);
+ if(menuincfile) {
+ desktop_menu_file_parse(state->desktop_menu,
+ menuincfile, state->cur_branch,
+ state->cur_path, FALSE, FALSE);
+ g_free(menuincfile);
+ }
}
}
} else if(!strcmp(attribute_values[i], "system")) {