all repos — openbox @ 84a60ebbfbdf9deea446c35c53f8703edeb8213d

openbox fork - make it a bit more like ryudo

dont use obsolete xmlChildrenNode
Dana Jansens danakj@orodu.net
commit

84a60ebbfbdf9deea446c35c53f8703edeb8213d

parent

804b12d46ab9eb6cd9d5b60931ae776be160536c

4 files changed, 41 insertions(+), 41 deletions(-)

jump to
M openbox/config.copenbox/config.c

@@ -71,7 +71,7 @@ while (n) {

if (parse_attr_string("key", n, &key)) { keylist = g_list_append(keylist, key); - parse_key(i, doc, n->xmlChildrenNode, keylist); + parse_key(i, doc, n->children, keylist); it = g_list_last(keylist); g_free(it->data);

@@ -93,7 +93,7 @@

static void parse_keyboard(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d) { - parse_key(i, doc, node->xmlChildrenNode, NULL); + parse_key(i, doc, node->children, NULL); } /*

@@ -116,7 +116,7 @@ ObUserAction uact;

ObMouseAction mact; ObAction *action; - node = node->xmlChildrenNode; + node = node->children; if ((n = parse_find_node("dragThreshold", node))) config_mouse_threshold = parse_int(doc, n);

@@ -127,7 +127,7 @@ n = parse_find_node("context", node);

while (n) { if (!parse_attr_string("name", n, &contextstr)) goto next_n; - nbut = parse_find_node("mousebind", n->xmlChildrenNode); + nbut = parse_find_node("mousebind", n->children); while (nbut) { if (!parse_attr_string("button", nbut, &buttonstr)) goto next_nbut;

@@ -148,7 +148,7 @@ uact = OB_USER_ACTION_MOUSE_MOTION;

mact = OB_MOUSE_ACTION_MOTION; } else goto next_nbut; - nact = parse_find_node("action", nbut->xmlChildrenNode); + nact = parse_find_node("action", nbut->children); while (nact) { if ((action = action_parse(i, doc, nact, uact))) mouse_bind(buttonstr, contextstr, mact, action);

@@ -169,7 +169,7 @@ void *d)

{ xmlNodePtr n; - node = node->xmlChildrenNode; + node = node->children; if ((n = parse_find_node("focusNew", node))) config_focus_new = parse_bool(doc, n);

@@ -188,7 +188,7 @@ void *d)

{ xmlNodePtr n; - node = node->xmlChildrenNode; + node = node->children; if ((n = parse_find_node("name", node))) { gchar *c;

@@ -209,7 +209,7 @@ void *d)

{ xmlNodePtr n; - node = node->xmlChildrenNode; + node = node->children; if ((n = parse_find_node("number", node))) config_desktops_num = parse_int(doc, n);

@@ -222,7 +222,7 @@ g_free(it->data);

g_slist_free(config_desktops_names); config_desktops_names = NULL; - nname = parse_find_node("name", n->xmlChildrenNode); + nname = parse_find_node("name", n->children); while (nname) { config_desktops_names = g_slist_append(config_desktops_names, parse_string(doc, nname));

@@ -236,7 +236,7 @@ void *d)

{ xmlNodePtr n; - node = node->xmlChildrenNode; + node = node->children; if ((n = parse_find_node("drawContents", node))) config_redraw_resize = parse_bool(doc, n);

@@ -246,7 +246,7 @@ static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d)

{ xmlNodePtr n; - node = node->xmlChildrenNode; + node = node->children; if ((n = parse_find_node("position", node))) { if (parse_contains("TopLeft", doc, n))

@@ -304,7 +304,7 @@ }

static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d) { - for (node = node->xmlChildrenNode; node; node = node->next) { + for (node = node->children; node; node = node->next) { if (!xmlStrcasecmp(node->name, (const xmlChar*) "file")) { gchar *c;

@@ -321,7 +321,7 @@ void *d)

{ xmlNodePtr n; - node = node->xmlChildrenNode; + node = node->children; if ((n = parse_find_node("strength", node))) config_resist_win = parse_int(doc, n); if ((n = parse_find_node("screen_edge_strength", node)))
M openbox/menu.copenbox/menu.c

@@ -89,13 +89,13 @@

for (it = config_menu_files; it; it = g_slist_next(it)) { if (menu_open(it->data, &doc, &node)) { loaded = TRUE; - parse_tree(menu_parse_inst, doc, node->xmlChildrenNode); + parse_tree(menu_parse_inst, doc, node->children); xmlFreeDoc(doc); } } if (!loaded) { if (menu_open("menu.xml", &doc, &node)) { - parse_tree(menu_parse_inst, doc, node->xmlChildrenNode); + parse_tree(menu_parse_inst, doc, node->children); xmlFreeDoc(doc); } }

@@ -149,7 +149,7 @@ menu_clear_entries(self);

menu_parse_state.pipe_creator = self; menu_parse_state.parent = self; - parse_tree(menu_parse_inst, doc, node->xmlChildrenNode); + parse_tree(menu_parse_inst, doc, node->children); xmlFreeDoc(doc); } else { g_warning("Invalid output from pipe-menu: %s", self->execute);

@@ -178,7 +178,7 @@ if (state->parent) {

if (parse_attr_string("label", node, &label)) { GSList *acts = NULL; - for (node = node->xmlChildrenNode; node; node = node->next) + for (node = node->children; node; node = node->next) if (!xmlStrcasecmp(node->name, (const xmlChar*) "action")) acts = g_slist_append(acts, action_parse (i, doc, node,

@@ -222,7 +222,7 @@ ObMenu *old;

old = state->parent; state->parent = menu; - parse_tree(i, doc, node->xmlChildrenNode); + parse_tree(i, doc, node->children); state->parent = old; } }
M openbox/session.copenbox/session.c

@@ -469,7 +469,7 @@ return;

g_free(sm_id); sm_id = id; - node = parse_find_node("window", node->xmlChildrenNode); + node = parse_find_node("window", node->children); while (node) { ObSessionState *state;

@@ -477,52 +477,52 @@ state = g_new0(ObSessionState, 1);

if (!parse_attr_string("id", node, &state->id)) goto session_load_bail; - if (!(n = parse_find_node("name", node->xmlChildrenNode))) + if (!(n = parse_find_node("name", node->children))) goto session_load_bail; state->name = parse_string(doc, n); - if (!(n = parse_find_node("class", node->xmlChildrenNode))) + if (!(n = parse_find_node("class", node->children))) goto session_load_bail; state->class = parse_string(doc, n); - if (!(n = parse_find_node("role", node->xmlChildrenNode))) + if (!(n = parse_find_node("role", node->children))) goto session_load_bail; state->role = parse_string(doc, n); - if (!(n = parse_find_node("stacking", node->xmlChildrenNode))) + if (!(n = parse_find_node("stacking", node->children))) goto session_load_bail; state->stacking = parse_int(doc, n); - if (!(n = parse_find_node("desktop", node->xmlChildrenNode))) + if (!(n = parse_find_node("desktop", node->children))) goto session_load_bail; state->desktop = parse_int(doc, n); - if (!(n = parse_find_node("x", node->xmlChildrenNode))) + if (!(n = parse_find_node("x", node->children))) goto session_load_bail; state->x = parse_int(doc, n); - if (!(n = parse_find_node("y", node->xmlChildrenNode))) + if (!(n = parse_find_node("y", node->children))) goto session_load_bail; state->y = parse_int(doc, n); - if (!(n = parse_find_node("width", node->xmlChildrenNode))) + if (!(n = parse_find_node("width", node->children))) goto session_load_bail; state->w = parse_int(doc, n); - if (!(n = parse_find_node("height", node->xmlChildrenNode))) + if (!(n = parse_find_node("height", node->children))) goto session_load_bail; state->h = parse_int(doc, n); state->shaded = - parse_find_node("shaded", node->xmlChildrenNode) != NULL; + parse_find_node("shaded", node->children) != NULL; state->iconic = - parse_find_node("iconic", node->xmlChildrenNode) != NULL; + parse_find_node("iconic", node->children) != NULL; state->skip_pager = - parse_find_node("skip_pager", node->xmlChildrenNode) != NULL; + parse_find_node("skip_pager", node->children) != NULL; state->skip_taskbar = - parse_find_node("skip_taskbar", node->xmlChildrenNode) != NULL; + parse_find_node("skip_taskbar", node->children) != NULL; state->fullscreen = - parse_find_node("fullscreen", node->xmlChildrenNode) != NULL; + parse_find_node("fullscreen", node->children) != NULL; state->above = - parse_find_node("above", node->xmlChildrenNode) != NULL; + parse_find_node("above", node->children) != NULL; state->below = - parse_find_node("below", node->xmlChildrenNode) != NULL; + parse_find_node("below", node->children) != NULL; state->max_horz = - parse_find_node("max_horz", node->xmlChildrenNode) != NULL; + parse_find_node("max_horz", node->children) != NULL; state->max_vert = - parse_find_node("max_vert", node->xmlChildrenNode) != NULL; + parse_find_node("max_vert", node->children) != NULL; /* save this */ session_saved_state = g_list_prepend(session_saved_state, state);
M parser/parse.cparser/parse.c

@@ -136,7 +136,7 @@ }

char *parse_string(xmlDocPtr doc, xmlNodePtr node) { - xmlChar *c = xmlNodeListGetString(doc, node->xmlChildrenNode, TRUE); + xmlChar *c = xmlNodeListGetString(doc, node->children, TRUE); char *s = g_strdup(c ? (char*)c : ""); xmlFree(c); return s;

@@ -144,7 +144,7 @@ }

int parse_int(xmlDocPtr doc, xmlNodePtr node) { - xmlChar *c = xmlNodeListGetString(doc, node->xmlChildrenNode, TRUE); + xmlChar *c = xmlNodeListGetString(doc, node->children, TRUE); int i = atoi((char*)c); xmlFree(c); return i;

@@ -152,7 +152,7 @@ }

gboolean parse_bool(xmlDocPtr doc, xmlNodePtr node) { - xmlChar *c = xmlNodeListGetString(doc, node->xmlChildrenNode, TRUE); + xmlChar *c = xmlNodeListGetString(doc, node->children, TRUE); gboolean b = FALSE; if (!xmlStrcasecmp(c, (const xmlChar*) "true")) b = TRUE;

@@ -166,7 +166,7 @@ }

gboolean parse_contains(const char *val, xmlDocPtr doc, xmlNodePtr node) { - xmlChar *c = xmlNodeListGetString(doc, node->xmlChildrenNode, TRUE); + xmlChar *c = xmlNodeListGetString(doc, node->children, TRUE); gboolean r; r = !xmlStrcasecmp(c, (const xmlChar*) val); xmlFree(c);