diff options
author | Ailin Nemui <ailin@esf51.localdomain> | 2015-01-07 03:40:34 +0100 |
---|---|---|
committer | Ailin Nemui <ailin@linux.site> | 2015-02-17 09:50:55 +0100 |
commit | 96d4fb9156bcef6fc14dbec43dfa0fcd0226d46f (patch) | |
tree | 27a1023f98d6a1b908fc4ce65995723cc5c56746 /src/fe-common | |
parent | 6b08cbe906bc2f13a34aca3195f8808d709c160c (diff) | |
download | irssi-96d4fb9156bcef6fc14dbec43dfa0fcd0226d46f.zip |
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.
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/completion.c | 4 | ||||
-rw-r--r-- | src/fe-common/core/hilight-text.c | 6 | ||||
-rw-r--r-- | src/fe-common/core/keyboard.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/themes.c | 4 | ||||
-rw-r--r-- | src/fe-common/core/windows-layout.c | 8 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index 31d62e10..2223b5b5 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -51,7 +51,7 @@ static const char *completion_find(const char *key, int automatic) if (node == NULL || node->type != NODE_TYPE_BLOCK) return NULL; - node = config_node_section(node, key, -1); + node = iconfig_node_section(node, key, -1); if (node == NULL) return NULL; @@ -785,7 +785,7 @@ static void cmd_completion(const char *data) } else if (*key != '\0' && *value != '\0') { int automatic = g_hash_table_lookup(optlist, "auto") != NULL; - node = config_node_section(node, key, NODE_TYPE_BLOCK); + node = iconfig_node_section(node, key, NODE_TYPE_BLOCK); iconfig_node_set_str(node, "value", value); if (automatic) iconfig_node_set_bool(node, "auto", TRUE); diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index 4b914517..de9a3130 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -66,7 +66,7 @@ static void hilight_add_config(HILIGHT_REC *rec) g_return_if_fail(rec != NULL); node = iconfig_node_traverse("(hilights", TRUE); - node = config_node_section(node, NULL, NODE_TYPE_BLOCK); + node = iconfig_node_section(node, NULL, NODE_TYPE_BLOCK); iconfig_node_set_str(node, "text", rec->text); if (rec->level > 0) iconfig_node_set_int(node, "level", rec->level); @@ -81,7 +81,7 @@ static void hilight_add_config(HILIGHT_REC *rec) if (rec->servertag) iconfig_node_set_str(node, "servertag", rec->servertag); if (rec->channels != NULL && *rec->channels != NULL) { - node = config_node_section(node, "channels", NODE_TYPE_LIST); + node = iconfig_node_section(node, "channels", NODE_TYPE_LIST); iconfig_node_add_list(node, rec->channels); } } @@ -471,7 +471,7 @@ static void read_hilight_config(void) rec->servertag = config_node_get_str(node, "servertag", NULL); hilight_init_rec(rec); - node = config_node_section(node, "channels", -1); + node = iconfig_node_section(node, "channels", -1); if (node != NULL) rec->channels = config_node_get_list(node); } diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c index bec1502e..02c8a8d7 100644 --- a/src/fe-common/core/keyboard.c +++ b/src/fe-common/core/keyboard.c @@ -135,7 +135,7 @@ static void keyconfig_save(const char *id, const char *key, const char *data) node = key_config_find(key); if (node == NULL) { node = iconfig_node_traverse("(keyboard", TRUE); - node = config_node_section(node, NULL, NODE_TYPE_BLOCK); + node = iconfig_node_section(node, NULL, NODE_TYPE_BLOCK); } iconfig_node_set_str(node, "key", key); diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index c0741cef..cd4039b9 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -739,7 +739,7 @@ static void theme_read_formats(THEME_REC *theme, const char *module, node = config_node_traverse(config, "formats", FALSE); if (node == NULL) return; - node = config_node_section(node, module, -1); + node = config_node_section(config, node, module, -1); if (node == NULL) return; for (tmp = node->value; tmp != NULL; tmp = tmp->next) { @@ -1177,7 +1177,7 @@ static void module_save(const char *module, MODULE_THEME_REC *rec, fnode = config_node_traverse(data->config, "formats", TRUE); - node = config_node_section(fnode, rec->name, NODE_TYPE_BLOCK); + node = config_node_section(data->config, fnode, rec->name, NODE_TYPE_BLOCK); for (n = 1; formats[n].def != NULL; n++) { if (rec->formats[n] != NULL) { config_node_set_str(data->config, node, formats[n].tag, diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 54d7dcbf..d0606bc9 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -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); |