]> Dogcows Code - chaz/openbox/commitdiff
add exit and reconfigure actions
authorDana Jansens <danakj@orodu.net>
Fri, 22 Jun 2007 04:01:36 +0000 (04:01 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 22 Jun 2007 04:01:36 +0000 (04:01 +0000)
Makefile.am
openbox/action.c
openbox/actions/all.c
openbox/actions/all.h
openbox/actions/exit.c [new file with mode: 0644]
openbox/actions/reconfigure.c [new file with mode: 0644]
openbox/actions/showdesktop.c

index 0529ecd727b05509247dc399e04f370532c00aec..002b50cf56c08a5001ab220d985491441fa3f213 100644 (file)
@@ -158,6 +158,8 @@ openbox_openbox_SOURCES = \
        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 \
index 74a15620e06f8ef933e1a5a17f6af06671b8af32..eba3c95a0abedd1e445b5a78c7b26be4447f9d08 100644 (file)
@@ -780,11 +780,6 @@ ActionString actionstrings[] =
         action_desktop_last,
         NULL
     },
-    {
-        "reconfigure",
-        action_reconfigure,
-        NULL
-    },
     {
         "restart",
         action_restart,
@@ -1706,11 +1701,6 @@ void action_resize(union ActionData *data)
     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_restart(union ActionData *data)
 
 void action_exit(union ActionData *data)
 {
-    ob_exit(0);
 }
 
 void action_cycle_windows(union ActionData *data)
index 077f394b5d0f27a9d33faf091610ead0f91f4d86..13068b7b6e45d86c861d02a93c3a470980e7749f 100644 (file)
@@ -6,4 +6,6 @@ void action_all_startup()
     action_debug_startup();
     action_showmenu_startup();
     action_showdesktop_startup();
+    action_reconfigure_startup();
+    action_exit_startup();
 }
index 75cce788238bb1ec0318c72d4b6e530bc9b22acd..dadfc3f0ec7eb161c7e1498a58110a01be28b2f9 100644 (file)
@@ -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 (file)
index 0000000..68b5cef
--- /dev/null
@@ -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 (file)
index 0000000..8802a37
--- /dev/null
@@ -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;
+}
index 2699b1bca77675363a53653c5a6375689759550d..8781f95d42a79f776f95955f9400bad0feec8dfe 100644 (file)
@@ -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);
 }
This page took 0.028934 seconds and 4 git commands to generate.