]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions/addremovedesktop.c
Merge branch 'backport' into work
[chaz/openbox] / openbox / actions / addremovedesktop.c
index b6e621ab0c5f74a523f748a86caa76c6f554548e..111742c1d44afd24ee53d24921c41933b01f4fba 100644 (file)
@@ -11,13 +11,25 @@ static gpointer setup_func(xmlNodePtr node);
 static gpointer setup_add_func(xmlNodePtr node);
 static gpointer setup_remove_func(xmlNodePtr node);
 static gboolean run_func(ObActionsData *data, gpointer options);
+/* 3.4-compatibility */
+static gpointer setup_addcurrent_func(xmlNodePtr node);
+static gpointer setup_addlast_func(xmlNodePtr node);
+static gpointer setup_removecurrent_func(xmlNodePtr node);
+static gpointer setup_removelast_func(xmlNodePtr node);
 
 void action_addremovedesktop_startup(void)
 {
-    actions_register("AddDesktop", setup_add_func, g_free, run_func,
-                     NULL, NULL);
-    actions_register("RemoveDesktop", setup_remove_func, g_free, run_func,
-                     NULL, NULL);
+    actions_register("AddDesktop", setup_add_func, g_free, run_func);
+    actions_register("RemoveDesktop", setup_remove_func, g_free, run_func);
+
+    /* 3.4-compatibility */
+    actions_register("AddDesktopLast", setup_addlast_func, g_free, run_func);
+    actions_register("RemoveDesktopLast", setup_removelast_func,
+                     g_free, run_func);
+    actions_register("AddDesktopCurrent", setup_addcurrent_func,
+                     g_free, run_func);
+    actions_register("RemoveDesktopCurrent", setup_removecurrent_func,
+                     g_free, run_func);
 }
 
 static gpointer setup_func(xmlNodePtr node)
@@ -69,3 +81,32 @@ static gboolean run_func(ObActionsData *data, gpointer options)
 
     return FALSE;
 }
+
+/* 3.4-compatibility */
+static gpointer setup_addcurrent_func(xmlNodePtr node)
+{
+    Options *o = setup_add_func(node);
+    o->current = TRUE;
+    return o;
+}
+
+static gpointer setup_addlast_func(xmlNodePtr node)
+{
+    Options *o = setup_add_func(node);
+    o->current = FALSE;
+    return o;
+}
+
+static gpointer setup_removecurrent_func(xmlNodePtr node)
+{
+    Options *o = setup_remove_func(node);
+    o->current = TRUE;
+    return o;
+}
+
+static gpointer setup_removelast_func(xmlNodePtr node)
+{
+    Options *o = setup_remove_func(node);
+    o->current = FALSE;
+    return o;
+}
This page took 0.02284 seconds and 4 git commands to generate.