diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-07-27 01:37:28 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-01-20 01:36:55 -0500 |
| commit | fdabb69f4f25596df972caa76c85c2aeba26226e (patch) | |
| tree | 2566f1a229a65e54cdffd88a255301d0bf7fa3a7 /openbox/actions/moverelative.c | |
| parent | 0667bbc3e2fbd3fa39206e843560735524840d35 (diff) | |
update openbox to use the current parser interface in libobt
there is also some random bug fixes for other libobt stuff in here.
Diffstat (limited to 'openbox/actions/moverelative.c')
| -rw-r--r-- | openbox/actions/moverelative.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/openbox/actions/moverelative.c b/openbox/actions/moverelative.c index 1d1189cd..ccdff545 100644 --- a/openbox/actions/moverelative.c +++ b/openbox/actions/moverelative.c @@ -9,41 +9,29 @@ typedef struct { gint y; } 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_moverelative_startup(void) { - actions_register("MoveRelative", - setup_func, - free_func, - run_func, - NULL, NULL); + actions_register("MoveRelative", setup_func, g_free, run_func, NULL, NULL); } -static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) +static gpointer setup_func(xmlNodePtr node) { xmlNodePtr n; Options *o; o = g_new0(Options, 1); - if ((n = parse_find_node("x", node))) - o->x = parse_int(doc, n); - if ((n = parse_find_node("y", node))) - o->y = parse_int(doc, n); + if ((n = obt_parse_find_node(node, "x"))) + o->x = obt_parse_node_int(n); + if ((n = obt_parse_find_node(node, "y"))) + o->y = obt_parse_node_int(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) { |
