]> Dogcows Code - chaz/openbox/blobdiff - plugins/placement/placement.c
send the configure notify for resizes too, just to be a little more safe
[chaz/openbox] / plugins / placement / placement.c
index 23ffbb5d9a47929b6280df8c3030f9e130c8da4e..889168b941f49e68aff6c8b33c865fff10b4af34 100644 (file)
@@ -3,29 +3,25 @@
 #include "kernel/frame.h"
 #include "kernel/screen.h"
 #include "kernel/openbox.h"
-#include "kernel/parse.h"
+#include "parser/parse.h"
 #include "history.h"
 #include <glib.h>
 
 static gboolean history;
 
-static void parse_assign(char *name, ParseToken *value)
+static void parse_xml(xmlDocPtr doc, xmlNodePtr node, void *d)
 {
-    if  (!g_ascii_strcasecmp(name, "remember")) {
-        if (value->type != TOKEN_BOOL)
-            yyerror("invalid value");
-        else
-            history = value->data.bool;
-    } else
-        yyerror("invalid option");
-    parse_free_token(value);
+    xmlNodePtr n;
+
+    if ((n = parse_find_node("remember", node)))
+        history = parse_bool(doc, n);
 }
 
 void plugin_setup_config()
 {
     history = TRUE;
 
-    parse_reg_section("placement", NULL, parse_assign);
+    parse_register("placement", parse_xml, NULL);
 }
 
 static void place_random(Client *c)
This page took 0.025471 seconds and 4 git commands to generate.