X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fexecute.c;h=77244d8f1d5dc1ad686a50e161cc91744882cb90;hb=b06b684589a618a2481ccc2745d5e03abb6bd5e0;hp=376eee5337ab4f48d824405156c5e27a14ab2ce9;hpb=8f37a97a4cc29d35f6a632ef2f71ac760e301ee5;p=chaz%2Fopenbox diff --git a/openbox/actions/execute.c b/openbox/actions/execute.c index 376eee53..77244d8f 100644 --- a/openbox/actions/execute.c +++ b/openbox/actions/execute.c @@ -33,7 +33,7 @@ static void i_cancel_func(gpointer options); void action_execute_startup(void) { - actions_register("Execute", setup_func, free_func, run_func, NULL, NULL); + actions_register("Execute", setup_func, free_func, run_func); } static gpointer setup_func(xmlNodePtr node) @@ -43,27 +43,27 @@ static gpointer setup_func(xmlNodePtr node) o = g_new0(Options, 1); - if ((n = obt_parse_find_node(node, "command")) || - (n = obt_parse_find_node(node, "execute"))) + if ((n = obt_xml_find_node(node, "command")) || + (n = obt_xml_find_node(node, "execute"))) { - gchar *s = obt_parse_node_string(n); + gchar *s = obt_xml_node_string(n); o->cmd = obt_paths_expand_tilde(s); g_free(s); } - if ((n = obt_parse_find_node(node, "prompt"))) - o->prompt = obt_parse_node_string(n); + if ((n = obt_xml_find_node(node, "prompt"))) + o->prompt = obt_xml_node_string(n); - if ((n = obt_parse_find_node(node, "startupnotify"))) { + if ((n = obt_xml_find_node(node, "startupnotify"))) { xmlNodePtr m; - if ((m = obt_parse_find_node(n->children, "enabled"))) - o->sn = obt_parse_node_bool(m); - if ((m = obt_parse_find_node(n->children, "name"))) - o->sn_name = obt_parse_node_string(m); - if ((m = obt_parse_find_node(n->children, "icon"))) - o->sn_icon = obt_parse_node_string(m); - if ((m = obt_parse_find_node(n->children, "wmclass"))) - o->sn_wmclass = obt_parse_node_string(m); + if ((m = obt_xml_find_node(n->children, "enabled"))) + o->sn = obt_xml_node_bool(m); + if ((m = obt_xml_find_node(n->children, "name"))) + o->sn_name = obt_xml_node_string(m); + if ((m = obt_xml_find_node(n->children, "icon"))) + o->sn_icon = obt_xml_node_string(m); + if ((m = obt_xml_find_node(n->children, "wmclass"))) + o->sn_wmclass = obt_xml_node_string(m); } return o; } @@ -169,9 +169,9 @@ static gboolean run_func(ObActionsData *data, gpointer options) before = c + 4; /* 4 = strlen("$pid") */ } else if ((c[1] == 'w' || c[1] == 'W') && - (c[2] == 'i' || c[2] == 'I') && - (c[3] == 'd' || c[3] == 'D') && - !g_ascii_isalnum(c[4])) + (c[2] == 'i' || c[2] == 'I') && + (c[3] == 'd' || c[3] == 'D') && + !g_ascii_isalnum(c[4])) { /* found $wid */ gchar *tmp;