My first litle hack =)

Brian Gomes Bascoy gomesbascoy at gmail.com
Mon Apr 2 14:39:08 EDT 2007


Sorry about the other diff ;P
I made this today from svn source:

**--- config.c.old        2007-04-02 15:18:08.000000000 -0300
+++ config.c    2007-04-02 15:24:37.000000000 -0300
@@ -671,6 +671,21 @@
         config_resist_layers_below = parse_bool(doc, n);
 }
 
+static void parse_init(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
+                       gpointer d)
+{
+    union ActionData *data;
+    xmlNodePtr n;
+    for (node = node->children; node; node = node->next)
+        if(node->type == XML_ELEMENT_NODE)
+            if ((n = parse_find_node("execute", node))) {
+                gchar *s = parse_string(doc, n);
+                data->execute.path = parse_expand_tilde(s);
+                g_free(s);
+                action_execute(data);
+            }
+}
+
 typedef struct
 {
     const gchar *key;
@@ -861,6 +876,8 @@
     config_per_app_settings = NULL;
 
     parse_register(i, "applications", parse_per_app_settings, NULL);
+
+    parse_register(i, "init", parse_init, NULL);
 }
 
 void config_shutdown()




More information about the openbox mailing list