]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions/restart.c
Merge branch 'master' into chaz
[chaz/openbox] / openbox / actions / restart.c
index 47f332b184ee9cd4f04c45aa8855550ab4af47f6..dc9a218a6985b69c437020b9cdd7182351868bb5 100644 (file)
@@ -12,7 +12,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_restart_startup(void)
 {
-    actions_register("Restart", setup_func, free_func, run_func, NULL, NULL);
+    actions_register("Restart", setup_func, free_func, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
@@ -20,12 +20,12 @@ static gpointer setup_func(xmlNodePtr node)
     xmlNodePtr n;
     Options *o;
 
-    o = g_new0(Options, 1);
+    o = g_slice_new0(Options);
 
-    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);
     }
@@ -36,7 +36,7 @@ static void free_func(gpointer options)
 {
     Options *o = options;
     g_free(o->cmd);
-    g_free(o);
+    g_slice_free(Options, o);
 }
 
 /* Always return FALSE because its not interactive */
This page took 0.021261 seconds and 4 git commands to generate.