Add "de" option to Iconify action that makes it deiconify windows (useful while alt...
authorMikael Magnusson <mikachu@comhem.se>
Mon, 23 Jul 2007 23:36:14 +0000 (01:36 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Wed, 16 Jan 2008 06:19:57 +0000 (07:19 +0100)
openbox/actions/iconify.c

index b82684ea1babbd9e5f8e7654a45f74594c34008c..1ef2da398a883b75dffd1510d878dbedbe6dc032 100644 (file)
@@ -2,21 +2,31 @@
 #include "openbox/client.h"
 
 static gboolean run_func(ObActionsData *data, gpointer options);
+static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
 
 void action_iconify_startup()
 {
     actions_register("Iconify",
-                     NULL, NULL,
+                     setup_func,
+                     NULL,
                      run_func,
                      NULL, NULL);
 }
 
+static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+{
+    xmlNodePtr n;
+
+    if ((n = parse_find_node("de", node)))
+        return parse_bool(doc, n);
+}
+
 /* Always return FALSE because its not interactive */
 static gboolean run_func(ObActionsData *data, gpointer options)
 {
     if (data->client) {
         actions_client_move(data, TRUE);
-        client_iconify(data->client, TRUE, TRUE, FALSE);
+        client_iconify(data->client, !options, TRUE, FALSE);
         actions_client_move(data, FALSE);
     }