add CONFIG_REC to config_node_section* APIs

this adds the CONFIG_REC * to the config_node_section and
config_node_section_index APIs as they will require access to the config
cache later on to make the config parser more robust.
This commit is contained in:
Ailin Nemui 2015-01-07 03:40:34 +01:00 committed by Ailin Nemui
commit 96d4fb9156
20 changed files with 62 additions and 60 deletions

View file

@ -143,7 +143,7 @@ static void sig_layout_restore(void)
if (window->theme_name != NULL)
window->theme = theme_load(window->theme_name);
window_add_items(window, config_node_section(node, "items", -1));
window_add_items(window, iconfig_node_section(node, "items", -1));
signal_emit("layout restore window", 2, window, node);
}
}
@ -160,7 +160,7 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item,
if (type == NULL)
return;
subnode = config_node_section(node, NULL, NODE_TYPE_BLOCK);
subnode = iconfig_node_section(node, NULL, NODE_TYPE_BLOCK);
iconfig_node_set_str(subnode, "type", type);
proto = item->chat_type == 0 ? NULL :
@ -185,7 +185,7 @@ static void window_save_items(WINDOW_REC *window, CONFIG_NODE *node)
{
GSList *tmp;
node = config_node_section(node, "items", NODE_TYPE_LIST);
node = iconfig_node_section(node, "items", NODE_TYPE_LIST);
for (tmp = window->items; tmp != NULL; tmp = tmp->next)
signal_emit("layout save item", 3, window, tmp->data, node);
}
@ -195,7 +195,7 @@ static void window_save(WINDOW_REC *window, CONFIG_NODE *node)
char refnum[MAX_INT_STRLEN];
ltoa(refnum, window->refnum);
node = config_node_section(node, refnum, NODE_TYPE_BLOCK);
node = iconfig_node_section(node, refnum, NODE_TYPE_BLOCK);
if (window->sticky_refnum)
iconfig_node_set_bool(node, "sticky_refnum", TRUE);