diff options
Diffstat (limited to 'openbox/actions/focus.c')
| -rw-r--r-- | openbox/actions/focus.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/openbox/actions/focus.c b/openbox/actions/focus.c index 1b544910..8bae49c7 100644 --- a/openbox/actions/focus.c +++ b/openbox/actions/focus.c @@ -9,20 +9,15 @@ typedef struct { gboolean stop_int; } Options; -static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); -static void free_func(gpointer options); +static gpointer setup_func(xmlNodePtr node); static gboolean run_func(ObActionsData *data, gpointer options); void action_focus_startup(void) { - actions_register("Focus", - setup_func, - free_func, - run_func, - NULL, NULL); + actions_register("Focus", setup_func, g_free, run_func); } -static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) +static gpointer setup_func(xmlNodePtr node) { xmlNodePtr n; Options *o; @@ -30,20 +25,13 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) o = g_new0(Options, 1); o->stop_int = TRUE; - if ((n = parse_find_node("here", node))) - o->here = parse_bool(doc, n); - if ((n = parse_find_node("stopInteractive", node))) - o->stop_int = parse_bool(doc, n); + if ((n = obt_xml_find_node(node, "here"))) + o->here = obt_xml_node_bool(n); + if ((n = obt_xml_find_node(node, "stopInteractive"))) + o->stop_int = obt_xml_node_bool(n); return o; } -static void free_func(gpointer options) -{ - Options *o = options; - - g_free(o); -} - /* Always return FALSE because its not interactive */ static gboolean run_func(ObActionsData *data, gpointer options) { |
