X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fplacement%2Fplacement.c;fp=plugins%2Fplacement%2Fplacement.c;h=dd818970b0fef6b498be005a507bbb549607fe90;hb=d2857b11944146e2e6973b7f7280cb57e1ee260b;hp=23ffbb5d9a47929b6280df8c3030f9e130c8da4e;hpb=f7df74b9cc9369fe401d5622c097e258a124f742;p=chaz%2Fopenbox diff --git a/plugins/placement/placement.c b/plugins/placement/placement.c index 23ffbb5d..dd818970 100644 --- a/plugins/placement/placement.c +++ b/plugins/placement/placement.c @@ -9,23 +9,19 @@ 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)