mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
iconfig's caching was a bit buggy - it didn't notice if some config node was
removed. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@213 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
afc4fbc223
commit
bb4d7566c2
12 changed files with 106 additions and 62 deletions
|
|
@ -46,9 +46,9 @@ static void hilight_add_config(HILIGHT_REC *rec)
|
|||
node = iconfig_node_traverse("(hilights", TRUE);
|
||||
node = config_node_section(node, NULL, NODE_TYPE_BLOCK);
|
||||
|
||||
config_node_set_str(node, "text", rec->text);
|
||||
iconfig_node_set_str(node, "text", rec->text);
|
||||
if (rec->level > 0) config_node_set_int(node, "level", rec->level);
|
||||
if (rec->color) config_node_set_str(node, "color", rec->color);
|
||||
if (rec->color) iconfig_node_set_str(node, "color", rec->color);
|
||||
if (rec->nickmask) config_node_set_bool(node, "nickmask", TRUE);
|
||||
if (rec->fullword) config_node_set_bool(node, "fullword", TRUE);
|
||||
if (rec->regexp) config_node_set_bool(node, "regexp", TRUE);
|
||||
|
|
@ -66,7 +66,7 @@ static void hilight_remove_config(HILIGHT_REC *rec)
|
|||
g_return_if_fail(rec != NULL);
|
||||
|
||||
node = iconfig_node_traverse("hilights", FALSE);
|
||||
if (node != NULL) config_node_list_remove(node, g_slist_index(hilights, rec));
|
||||
if (node != NULL) iconfig_node_list_remove(node, g_slist_index(hilights, rec));
|
||||
}
|
||||
|
||||
static void hilight_destroy(HILIGHT_REC *rec)
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ void keyboard_save(void)
|
|||
GSList *tmp, *tmp2;
|
||||
|
||||
/* remove old keyboard settings */
|
||||
config_node_set_str(NULL, "(keyboard", NULL);
|
||||
iconfig_node_set_str(NULL, "(keyboard", NULL);
|
||||
keyboard = iconfig_node_traverse("(keyboard", TRUE);
|
||||
|
||||
for (tmp = keyinfos; tmp != NULL; tmp = tmp->next) {
|
||||
|
|
@ -217,8 +217,8 @@ void keyboard_save(void)
|
|||
|
||||
listnode = config_node_section(node, NULL, NODE_TYPE_BLOCK);
|
||||
if (key->data != NULL)
|
||||
config_node_set_str(listnode, "data", key->data);
|
||||
config_node_set_str(listnode, "key", key->key);
|
||||
iconfig_node_set_str(listnode, "data", key->data);
|
||||
iconfig_node_set_str(listnode, "key", key->key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue