summaryrefslogtreecommitdiff
path: root/openbox/actions
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-06-22 04:01:36 +0000
committerDana Jansens <danakj@orodu.net>2007-06-22 04:01:36 +0000
commit5d57a39b702a0f198c8a180a20058e3c82615523 (patch)
treef4d99e1ccd99262c51b58e841f2094c8f9cedb3a /openbox/actions
parent1b7e813c62a6e54690d15550d51ac4269e63f346 (diff)
add exit and reconfigure actions
Diffstat (limited to 'openbox/actions')
-rw-r--r--openbox/actions/all.c2
-rw-r--r--openbox/actions/all.h2
-rw-r--r--openbox/actions/exit.c20
-rw-r--r--openbox/actions/reconfigure.c20
-rw-r--r--openbox/actions/showdesktop.c3
5 files changed, 45 insertions, 2 deletions
diff --git a/openbox/actions/all.c b/openbox/actions/all.c
index 077f394b..13068b7b 100644
--- a/openbox/actions/all.c
+++ b/openbox/actions/all.c
@@ -6,4 +6,6 @@ void action_all_startup()
action_debug_startup();
action_showmenu_startup();
action_showdesktop_startup();
+ action_reconfigure_startup();
+ action_exit_startup();
}
diff --git a/openbox/actions/all.h b/openbox/actions/all.h
index 75cce788..dadfc3f0 100644
--- a/openbox/actions/all.h
+++ b/openbox/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
diff --git a/openbox/actions/exit.c b/openbox/actions/exit.c
new file mode 100644
index 00000000..68b5cef4
--- /dev/null
+++ b/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;
+}
diff --git a/openbox/actions/reconfigure.c b/openbox/actions/reconfigure.c
new file mode 100644
index 00000000..8802a37b
--- /dev/null
+++ b/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;
+}
diff --git a/openbox/actions/showdesktop.c b/openbox/actions/showdesktop.c
index 2699b1bc..8781f95d 100644
--- a/openbox/actions/showdesktop.c
+++ b/openbox/actions/showdesktop.c
@@ -6,8 +6,7 @@ static gboolean run_func(ObActionsData *data, gpointer options);
void action_showdesktop_startup()
{
actions_register("ShowDesktop",
- NULL,
- NULL,
+ NULL, NULL,
run_func,
NULL, NULL);
}