- if ((n = parse_find_node("x", node))) {
- gchar *s = parse_string(doc, n);
- if (!g_ascii_strcasecmp(s, "center"))
- o->xcenter = TRUE;
- else {
- if (s[0] == '-')
- o->xopposite = TRUE;
- if (s[0] == '-' || s[0] == '+')
- o->x = atoi(s+1);
- else
- o->x = atoi(s);
- }
+ if ((n = obt_xml_find_node(node, "x")))
+ parse_coord(n, &o->x, &o->xopposite, &o->xcenter);
+
+ if ((n = obt_xml_find_node(node, "y")))
+ parse_coord(n, &o->y, &o->yopposite, &o->ycenter);
+
+ if ((n = obt_xml_find_node(node, "width"))) {
+ gchar *s = obt_xml_node_string(n);
+ if (g_ascii_strcasecmp(s, "current") != 0)
+ o->w = obt_xml_node_int(n);
+ g_free(s);
+ }
+ if ((n = obt_xml_find_node(node, "height"))) {
+ gchar *s = obt_xml_node_string(n);
+ if (g_ascii_strcasecmp(s, "current") != 0)
+ o->h = obt_xml_node_int(n);