X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenu.c;h=768630bd2939a9b80c35a0492c0380cd96b71ef3;hb=5563e251c36a1fbda703cf4bc3c8c6ae543829bd;hp=97af104e17dba688dc36193331585902e1237aac;hpb=fdabb69f4f25596df972caa76c85c2aeba26226e;p=chaz%2Fopenbox diff --git a/openbox/menu.c b/openbox/menu.c index 97af104e..768630bd 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -35,6 +35,7 @@ #include "client_list_combined_menu.h" #include "gettext.h" #include "obt/parse.h" +#include "obt/paths.h" typedef struct _ObMenuParseState ObMenuParseState; @@ -94,8 +95,7 @@ void menu_startup(gboolean reconfig) "openbox_menu")) { loaded = TRUE; - obt_parse_tree(menu_parse_inst, - obt_parse_instance_root(menu_parse_inst)->children); + obt_parse_tree_from_root(menu_parse_inst); obt_parse_close(menu_parse_inst); } else g_message(_("Unable to find a valid menu file '%s'"), @@ -107,8 +107,7 @@ void menu_startup(gboolean reconfig) "menu.xml", "openbox_menu")) { - obt_parse_tree(menu_parse_inst, - obt_parse_instance_root(menu_parse_inst)->children); + obt_parse_tree_from_root(menu_parse_inst); obt_parse_close(menu_parse_inst); } else g_message(_("Unable to find a valid menu file '%s'"), @@ -160,7 +159,6 @@ void menu_clear_pipe_caches(void) void menu_pipe_execute(ObMenu *self) { - xmlNodePtr node; gchar *output; GError *err = NULL; @@ -181,7 +179,7 @@ void menu_pipe_execute(ObMenu *self) { menu_parse_state.pipe_creator = self; menu_parse_state.parent = self; - obt_parse_tree(menu_parse_inst, node->children); + obt_parse_tree_from_root(menu_parse_inst); obt_parse_close(menu_parse_inst); } else { g_message(_("Invalid output from pipe-menu '%s'"), self->execute); @@ -317,7 +315,7 @@ static void parse_menu(xmlNodePtr node, gpointer data) if ((menu = menu_new(name, title, TRUE, NULL))) { menu->pipe_creator = state->pipe_creator; if (obt_parse_attr_string(node, "execute", &script)) { - menu->execute = parse_expand_tilde(script); + menu->execute = obt_paths_expand_tilde(script); } else { ObMenu *old;