]>
Dogcows Code - chaz/openbox/blob - openbox/actions/restart.c
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_new0(Options
, 1);
25 if ((n
= obt_parse_find_node(node
, "command")) ||
26 (n
= obt_parse_find_node(node
, "execute")))
28 gchar
*s
= obt_parse_node_string(n
);
29 o
->cmd
= obt_paths_expand_tilde(s
);
35 static void free_func(gpointer options
)
42 /* Always return FALSE because its not interactive */
43 static gboolean
run_func(ObActionsData
*data
, gpointer options
)
47 ob_restart_other(o
->cmd
);
This page took 0.036274 seconds and 4 git commands to generate.