]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions/if.c
Add a focus option, unfocusOnLeave that removes focus from a window when the pointer...
[chaz/openbox] / openbox / actions / if.c
index 8d2f281f0eb941d36c18b3b0dbd6e551d17ddf83..47ff2fd58e3c5cd252719328add4f1ff11ac52c1 100644 (file)
@@ -29,7 +29,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_if_startup(void)
 {
-    actions_register("If", setup_func, free_func, run_func, NULL, NULL);
+    actions_register("If", setup_func, free_func, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
@@ -79,20 +79,20 @@ static gpointer setup_func(xmlNodePtr node)
     if ((n = obt_parse_find_node(node, "then"))) {
         xmlNodePtr m;
 
-        m = obt_parse_find_node(n->xmlChildrenNode, "action");
+        m = obt_parse_find_node(n->children, "action");
         while (m) {
             ObActionsAct *action = actions_parse(m);
-            if (action) o->thenacts = g_slist_prepend(o->thenacts, action);
+            if (action) o->thenacts = g_slist_append(o->thenacts, action);
             m = obt_parse_find_node(m->next, "action");
         }
     }
     if ((n = obt_parse_find_node(node, "else"))) {
         xmlNodePtr m;
 
-        m = obt_parse_find_node(n->xmlChildrenNode, "action");
+        m = obt_parse_find_node(n->children, "action");
         while (m) {
             ObActionsAct *action = actions_parse(m);
-            if (action) o->elseacts = g_slist_prepend(o->elseacts, action);
+            if (action) o->elseacts = g_slist_append(o->elseacts, action);
             m = obt_parse_find_node(m->next, "action");
         }
     }
This page took 0.024961 seconds and 4 git commands to generate.