From d18d9c9379e3387073fc9346e9857fdde077b985 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 17 Dec 2009 10:23:48 -0500 Subject: Make it possible for an action name to choose whether it is interactive or not based on its options. This way we can use the same name with options for an interactive action and a non-interactive action. Shorten the names of the ObActionsInteractive* functions to ObActionsI* Add a ObActionsIPreFunc that is called for interactive actions before the interactivity (key/mouse grab) is started. Add a ObActionsIPostFunc that is called for interactive actions after the interactiviti (key/mouse grab) has ended. --- openbox/actions/desktop.c | 60 +++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 36 deletions(-) (limited to 'openbox/actions/desktop.c') diff --git a/openbox/actions/desktop.c b/openbox/actions/desktop.c index 3b33afbd..27b717b1 100644 --- a/openbox/actions/desktop.c +++ b/openbox/actions/desktop.c @@ -49,43 +49,31 @@ static gpointer setup_send_down_func(xmlNodePtr node); void action_desktop_startup(void) { - actions_register("GoToDesktop", setup_go_func, g_free, run_func, - NULL, NULL); - actions_register("SendToDesktop", setup_send_func, g_free, run_func, - NULL, NULL); + actions_register("GoToDesktop", setup_go_func, g_free, run_func); + actions_register("SendToDesktop", setup_send_func, g_free, run_func); /* 3.4-compatibility */ - actions_register("DesktopLast", setup_go_last_func, g_free, run_func, - NULL, NULL); - actions_register("SendToDesktopLast", setup_send_last_func, g_free, run_func, - NULL, NULL); - actions_register("Desktop", setup_go_abs_func, g_free, run_func, - NULL, NULL); - actions_register("SendToDesktop", setup_send_abs_func, g_free, run_func, - NULL, NULL); - actions_register("DesktopNext", setup_go_next_func, g_free, run_func, - NULL, NULL); - actions_register("SendToDesktopNext", setup_send_next_func, g_free, run_func, - NULL, NULL); - actions_register("DesktopPrevious", setup_go_prev_func, g_free, run_func, - NULL, NULL); - actions_register("SendToDesktopPrevious", setup_send_prev_func, g_free, run_func, - NULL, NULL); - actions_register("DesktopLeft", setup_go_left_func, g_free, run_func, - NULL, NULL); - actions_register("SendToDesktopLeft", setup_send_left_func, g_free, run_func, - NULL, NULL); - actions_register("DesktopRight", setup_go_right_func, g_free, run_func, - NULL, NULL); - actions_register("SendToDesktopRight", setup_send_right_func, g_free, run_func, - NULL, NULL); - actions_register("DesktopUp", setup_go_up_func, g_free, run_func, - NULL, NULL); - actions_register("SendToDesktopUp", setup_send_up_func, g_free, run_func, - NULL, NULL); - actions_register("DesktopDown", setup_go_down_func, g_free, run_func, - NULL, NULL); - actions_register("SendToDesktopDown", setup_send_down_func, g_free, run_func, - NULL, NULL); + actions_register("DesktopLast", setup_go_last_func, g_free, run_func); + actions_register("SendToDesktopLast", setup_send_last_func, + g_free, run_func); + actions_register("Desktop", setup_go_abs_func, g_free, run_func); + actions_register("SendToDesktop", setup_send_abs_func, g_free, run_func); + actions_register("DesktopNext", setup_go_next_func, g_free, run_func); + actions_register("SendToDesktopNext", setup_send_next_func, + g_free, run_func); + actions_register("DesktopPrevious", setup_go_prev_func, g_free, run_func); + actions_register("SendToDesktopPrevious", setup_send_prev_func, + g_free, run_func); + actions_register("DesktopLeft", setup_go_left_func, g_free, run_func); + actions_register("SendToDesktopLeft", setup_send_left_func, + g_free, run_func); + actions_register("DesktopRight", setup_go_right_func, g_free, run_func); + actions_register("SendToDesktopRight", setup_send_right_func, + g_free, run_func); + actions_register("DesktopUp", setup_go_up_func, g_free, run_func); + actions_register("SendToDesktopUp", setup_send_up_func, g_free, run_func); + actions_register("DesktopDown", setup_go_down_func, g_free, run_func); + actions_register("SendToDesktopDown", setup_send_down_func, + g_free, run_func); } static gpointer setup_go_func(xmlNodePtr node) -- cgit v1.2.3