1 #include "openbox/actions.h"
2 #include "openbox/openbox.h"
9 static gpointer setup_func(xmlNodePtr node);
10 static void free_func(gpointer options);
11 static gboolean run_func(ObActionsData *data, gpointer options);
13 void action_restart_startup(void)
15 actions_register("Restart", setup_func, free_func, run_func);
18 static gpointer setup_func(xmlNodePtr node)
23 o = g_slice_new0(Options);
25 if ((n = obt_xml_find_node(node, "command")) ||
26 (n = obt_xml_find_node(node, "execute")))
28 gchar *s = obt_xml_node_string(n);
29 o->cmd = obt_paths_expand_tilde(s);
35 static void free_func(gpointer options)
39 g_slice_free(Options, o);
42 /* Always return FALSE because its not interactive */
43 static gboolean run_func(ObActionsData *data, gpointer options)
47 ob_restart_other(o->cmd);