]> Dogcows Code - chaz/openbox/commitdiff
create actions from string names
authorDana Jansens <danakj@orodu.net>
Wed, 26 Mar 2003 12:53:04 +0000 (12:53 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 26 Mar 2003 12:53:04 +0000 (12:53 +0000)
openbox/action.c
openbox/action.h

index 2265b4662cddc8d031b949a7ded071580ebd72ac..4cd751071037ded7b412df70d8d545a1bb44419e 100644 (file)
@@ -98,6 +98,8 @@ Action *action_from_string(char *name)
         a = action_new(action_send_to_previous_desktop);
         a->data.sendtonextprev.wrap = TRUE;
         a->data.sendtonextprev.follow = TRUE;
+    } else if (!g_ascii_strcasecmp(name, "desktop")) {
+        a = action_new(action_desktop);
     } else if (!g_ascii_strcasecmp(name, "nextdesktop")) {
         a = action_new(action_next_desktop);
         a->data.nextprevdesktop.wrap = FALSE;
index 5208025140b8c314c0d16330752d0c99d1946a27..e3d891f0a740d97f95fa6708dfe14e417d35cd64 100644 (file)
@@ -85,6 +85,15 @@ typedef struct {
 } Action;
 
 Action *action_new(void (*func)(union ActionData *data));
+
+/* Creates a new Action from the name of the action
+   A few action types need data set after making this call still. Check if
+   the returned action's "func" is one of these.
+   action_execute - the path needs to be set
+   action_restart - the path can optionally be set
+   action_desktop - the destination desktop needs to be set
+*/
+Action *action_from_string(char *name);
 void action_free(Action *a);
 
 /* Execute */
This page took 0.028751 seconds and 4 git commands to generate.