remove the global growtoedge action from 3.4
authorDana Jansens <danakj@orodu.net>
Thu, 19 Jul 2007 19:39:28 +0000 (15:39 -0400)
committerDana Jansens <danakj@orodu.net>
Thu, 19 Jul 2007 19:39:28 +0000 (15:39 -0400)
openbox/actions/growtoedge.c

index e43e82ce2f56133278d46efd4729a48a58667423..ff566d7f533f2e7b37f778ddc31b736aa2cfcc5e 100644 (file)
@@ -9,7 +9,6 @@ typedef struct {
     ObDirection dir;
 } Options;
 
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
 static gpointer setup_north_func(ObParseInst *i,
                                  xmlDocPtr doc, xmlNodePtr node);
 static gpointer setup_south_func(ObParseInst *i,
@@ -23,61 +22,16 @@ static gboolean run_func(ObActionsData *data, gpointer options);
 
 void action_growtoedge_startup()
 {
-    actions_register("GrowToEdge",
-                     setup_func,
-                     free_func,
-                     run_func,
+    actions_register("GrowToEdgeNorth", setup_north_func, g_free, run_func,
                      NULL, NULL);
-    actions_register("GrowToEdgeNorth",
-                     setup_north_func,
-                     free_func,
-                     run_func,
+    actions_register("GrowToEdgeSouth", setup_south_func, g_free, run_func,
                      NULL, NULL);
-    actions_register("GrowToEdgeSouth",
-                     setup_south_func,
-                     free_func,
-                     run_func,
+    actions_register("GrowToEdgeEast", setup_east_func, g_free, run_func,
                      NULL, NULL);
-    actions_register("GrowToEdgeEast",
-                     setup_east_func,
-                     free_func,
-                     run_func,
-                     NULL, NULL);
-    actions_register("GrowToEdgeWest",
-                     setup_west_func,
-                     free_func,
-                     run_func,
+    actions_register("GrowToEdgeWest", setup_west_func, g_free, run_func,
                      NULL, NULL);
 }
 
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
-{
-    xmlNodePtr n;
-    Options *o;
-
-    o = g_new0(Options, 1);
-    o->dir = OB_DIRECTION_NORTH;
-
-    if ((n = parse_find_node("direction", node))) {
-        gchar *s = parse_string(doc, n);
-        if (!g_ascii_strcasecmp(s, "north") ||
-            !g_ascii_strcasecmp(s, "up"))
-            o->dir = OB_DIRECTION_NORTH;
-        else if (!g_ascii_strcasecmp(s, "south") ||
-                 !g_ascii_strcasecmp(s, "down"))
-            o->dir = OB_DIRECTION_SOUTH;
-        else if (!g_ascii_strcasecmp(s, "west") ||
-                 !g_ascii_strcasecmp(s, "left"))
-            o->dir = OB_DIRECTION_WEST;
-        else if (!g_ascii_strcasecmp(s, "east") ||
-                 !g_ascii_strcasecmp(s, "right"))
-            o->dir = OB_DIRECTION_EAST;
-        g_free(s);
-    }
-
-    return o;
-}
-
 static gpointer setup_north_func(ObParseInst *i,
                                  xmlDocPtr doc, xmlNodePtr node)
 {
@@ -110,13 +64,6 @@ static gpointer setup_west_func(ObParseInst *i,
     return o;
 }
 
-static void free_func(gpointer options)
-{
-    Options *o = options;
-
-    g_free(o);
-}
-
 /* Always return FALSE because its not interactive */
 static gboolean run_func(ObActionsData *data, gpointer options)
 {