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);
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);
}
/*
ObMouseAction mact;
ObAction *action;
- node = node->xmlChildrenNode;
+ node = node->children;
if ((n = parse_find_node("dragThreshold", node)))
config_mouse_threshold = parse_int(doc, n);
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;
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);
{
xmlNodePtr n;
- node = node->xmlChildrenNode;
+ node = node->children;
if ((n = parse_find_node("focusNew", node)))
config_focus_new = parse_bool(doc, n);
{
xmlNodePtr n;
- node = node->xmlChildrenNode;
+ node = node->children;
if ((n = parse_find_node("name", node))) {
gchar *c;
{
xmlNodePtr n;
- node = node->xmlChildrenNode;
+ node = node->children;
if ((n = parse_find_node("number", node)))
config_desktops_num = parse_int(doc, n);
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));
{
xmlNodePtr n;
- node = node->xmlChildrenNode;
+ node = node->children;
if ((n = parse_find_node("drawContents", node)))
config_redraw_resize = parse_bool(doc, n);
{
xmlNodePtr n;
- node = node->xmlChildrenNode;
+ node = node->children;
if ((n = parse_find_node("position", node))) {
if (parse_contains("TopLeft", doc, n))
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;
{
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)))
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);
}
}
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);
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,
old = state->parent;
state->parent = menu;
- parse_tree(i, doc, node->xmlChildrenNode);
+ parse_tree(i, doc, node->children);
state->parent = old;
}
}
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;
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);
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;
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;
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;
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);