]> Dogcows Code - chaz/openbox/commitdiff
add the showdesktop action
authorDana Jansens <danakj@orodu.net>
Fri, 22 Jun 2007 03:57:48 +0000 (03:57 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 22 Jun 2007 03:57:48 +0000 (03:57 +0000)
Makefile.am
openbox/action.c
openbox/actions/all.c
openbox/actions/all.h
openbox/actions/debug.c
openbox/actions/showdesktop.c [new file with mode: 0644]
openbox/actions/showmenu.c

index e66d9d4b7c61b653a67215d69f26471a38cffdbb..0529ecd727b05509247dc399e04f370532c00aec 100644 (file)
@@ -158,6 +158,7 @@ openbox_openbox_SOURCES = \
        openbox/actions/all.h \
        openbox/actions/debug.c \
        openbox/actions/execute.c \
+       openbox/actions/showdesktop.c \
        openbox/actions/showmenu.c \
        openbox/actions.c \
        openbox/actions.h \
index 9b8653dfd7c817dde11e86b4d964decec6263a43..74a15620e06f8ef933e1a5a17f6af06671b8af32 100644 (file)
@@ -775,21 +775,6 @@ ActionString actionstrings[] =
         action_toggle_dockautohide,
         NULL
     },
-    {
-        "toggleshowdesktop",
-        action_toggle_show_desktop,
-        NULL
-    },
-    {
-        "showdesktop",
-        action_show_desktop,
-        NULL
-    },
-    {
-        "unshowdesktop",
-        action_unshow_desktop,
-        NULL
-    },
     {
         "desktoplast",
         action_desktop_last,
@@ -1895,21 +1880,6 @@ void action_toggle_dockautohide(union ActionData *data)
     dock_configure();
 }
 
-void action_toggle_show_desktop(union ActionData *data)
-{
-    screen_show_desktop(!screen_showing_desktop, NULL);
-}
-
-void action_show_desktop(union ActionData *data)
-{
-    screen_show_desktop(TRUE, NULL);
-}
-
-void action_unshow_desktop(union ActionData *data)
-{
-    screen_show_desktop(FALSE, NULL);
-}
-
 void action_break_chroot(union ActionData *data)
 {
     /* break out of one chroot */
index e0485ebe3760fe77d38393af20f6b9a2aa2fa3ff..077f394b5d0f27a9d33faf091610ead0f91f4d86 100644 (file)
@@ -5,4 +5,5 @@ void action_all_startup()
     action_execute_startup();
     action_debug_startup();
     action_showmenu_startup();
+    action_showdesktop_startup();
 }
index 13fbbd46fb1fac75c4d05a592b2ef35a7907ff8c..75cce788238bb1ec0318c72d4b6e530bc9b22acd 100644 (file)
@@ -6,5 +6,6 @@ void action_all_startup();
 void action_execute_startup();
 void action_debug_startup();
 void action_showmenu_startup();
+void action_showdesktop_startup();
 
 #endif
index f219e05971c79d3d2134dc6da6dda4990ac0b584..bbc9cca2834b3eb16f2a39494b67542ccd7838ec 100644 (file)
@@ -8,13 +8,6 @@ typedef struct {
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
-/*
-static gboolean i_input_func(guint initial_state,
-                             XEvent *e,
-                             gpointer options,
-                             gboolean *used);
-static void     i_cancel_func(gpointer options);
-*/
 
 void action_debug_startup()
 {
diff --git a/openbox/actions/showdesktop.c b/openbox/actions/showdesktop.c
new file mode 100644 (file)
index 0000000..2699b1b
--- /dev/null
@@ -0,0 +1,21 @@
+#include "openbox/actions.h"
+#include "openbox/screen.h"
+
+static gboolean run_func(ObActionsData *data, gpointer options);
+
+void action_showdesktop_startup()
+{
+    actions_register("ShowDesktop",
+                     NULL,
+                     NULL,
+                     run_func,
+                     NULL, NULL);
+}
+
+/* Always return FALSE because its not interactive */
+static gboolean run_func(ObActionsData *data, gpointer options)
+{
+    screen_show_desktop(!screen_showing_desktop, NULL);
+
+    return FALSE;
+}
index 6b6cbbe0f10053f6bbbb7131259f4fee048614db..ec22de5bde667c5915946944f8fcc70b6b060334 100644 (file)
@@ -8,13 +8,6 @@ typedef struct {
 static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
 static void     free_func(gpointer options);
 static gboolean run_func(ObActionsData *data, gpointer options);
-/*
-static gboolean i_input_func(guint initial_state,
-                             XEvent *e,
-                             gpointer options,
-                             gboolean *used);
-static void     i_cancel_func(gpointer options);
-*/
 
 void action_showmenu_startup()
 {
This page took 0.032187 seconds and 4 git commands to generate.