all repos — openbox @ 5d57a39b702a0f198c8a180a20058e3c82615523

openbox fork - make it a bit more like ryudo

add exit and reconfigure actions
Dana Jansens danakj@orodu.net
commit

5d57a39b702a0f198c8a180a20058e3c82615523

parent

1b7e813c62a6e54690d15550d51ac4269e63f346

M Makefile.amMakefile.am

@@ -158,6 +158,8 @@ openbox/actions/all.c \

openbox/actions/all.h \ openbox/actions/debug.c \ openbox/actions/execute.c \ + openbox/actions/exit.c \ + openbox/actions/reconfigure.c \ openbox/actions/showdesktop.c \ openbox/actions/showmenu.c \ openbox/actions.c \
M openbox/action.copenbox/action.c

@@ -781,11 +781,6 @@ action_desktop_last,

NULL }, { - "reconfigure", - action_reconfigure, - NULL - }, - { "restart", action_restart, NULL

@@ -1706,11 +1701,6 @@

moveresize_start(c, data->any.x, data->any.y, data->any.button, corner); } -void action_reconfigure(union ActionData *data) -{ - ob_reconfigure(); -} - void action_restart(union ActionData *data) { ob_restart_other(data->execute.path);

@@ -1718,7 +1708,6 @@ }

void action_exit(union ActionData *data) { - ob_exit(0); } void action_cycle_windows(union ActionData *data)
M openbox/actions/all.copenbox/actions/all.c

@@ -6,4 +6,6 @@ action_execute_startup();

action_debug_startup(); action_showmenu_startup(); action_showdesktop_startup(); + action_reconfigure_startup(); + action_exit_startup(); }
M openbox/actions/all.hopenbox/actions/all.h

@@ -7,5 +7,7 @@ void action_execute_startup();

void action_debug_startup(); void action_showmenu_startup(); void action_showdesktop_startup(); +void action_reconfigure_startup(); +void action_exit_startup(); #endif
A openbox/actions/exit.c

@@ -0,0 +1,20 @@

+#include "openbox/actions.h" +#include "openbox/openbox.h" + +static gboolean run_func(ObActionsData *data, gpointer options); + +void action_exit_startup() +{ + actions_register("Exit", + NULL, NULL, + run_func, + NULL, NULL); +} + +/* Always return FALSE because its not interactive */ +static gboolean run_func(ObActionsData *data, gpointer options) +{ + ob_exit(0); + + return FALSE; +}
A openbox/actions/reconfigure.c

@@ -0,0 +1,20 @@

+#include "openbox/actions.h" +#include "openbox/openbox.h" + +static gboolean run_func(ObActionsData *data, gpointer options); + +void action_reconfigure_startup() +{ + actions_register("Reconfigure", + NULL, NULL, + run_func, + NULL, NULL); +} + +/* Always return FALSE because its not interactive */ +static gboolean run_func(ObActionsData *data, gpointer options) +{ + ob_reconfigure(); + + return FALSE; +}
M openbox/actions/showdesktop.copenbox/actions/showdesktop.c

@@ -6,8 +6,7 @@

void action_showdesktop_startup() { actions_register("ShowDesktop", - NULL, - NULL, + NULL, NULL, run_func, NULL, NULL); }