1 #include "openbox/actions.h"
2 #include "openbox/openbox.h"
8 static gpointer setup_func(xmlNodePtr node);
9 static void free_func(gpointer options);
10 static gboolean run_func(ObActionsData *data, gpointer options);
12 void action_restart_startup(void)
14 actions_register("Restart", setup_func, free_func, run_func, NULL, NULL);
17 static gpointer setup_func(xmlNodePtr node)
22 o = g_new0(Options, 1);
24 if ((n = obt_parse_find_node(node, "command")) ||
25 (n = obt_parse_find_node(node, "execute")))
27 gchar *s = obt_parse_node_string(n);
28 o->cmd = parse_expand_tilde(s);
34 static void free_func(gpointer options)
41 /* Always return FALSE because its not interactive */
42 static gboolean run_func(ObActionsData *data, gpointer options)
46 ob_restart_other(o->cmd);