]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions/moverelative.c
update openbox to use the current parser interface in libobt
[chaz/openbox] / openbox / actions / moverelative.c
index 1d1189cdb7c089d26ef74dd00e3052ef77cce863..ccdff545d5702d02c4a470e98df31b3249c7e823 100644 (file)
@@ -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)
 {
This page took 0.022068 seconds and 4 git commands to generate.