1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

some updates for checking when to not autosave config.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@872 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-11-26 02:26:13 +00:00 committed by cras
parent a954fa03d0
commit f9653a5e1e
2 changed files with 6 additions and 2 deletions
src
core
lib-config

View File

@ -323,6 +323,7 @@ static void init_configfile(void)
g_free(str); g_free(str);
mainconfig = parse_configfile(NULL); mainconfig = parse_configfile(NULL);
config_last_modifycounter = mainconfig->modifycounter;
/* any errors? */ /* any errors? */
if (config_last_error(mainconfig) != NULL) { if (config_last_error(mainconfig) != NULL) {
@ -365,6 +366,7 @@ int settings_reread(const char *fname)
config_close(mainconfig); config_close(mainconfig);
mainconfig = tempconfig; mainconfig = tempconfig;
config_last_modifycounter = mainconfig->modifycounter;
signal_emit("setup changed", 0); signal_emit("setup changed", 0);
signal_emit("setup reread", 0); signal_emit("setup reread", 0);

View File

@ -104,9 +104,11 @@ void config_node_set_str(CONFIG_REC *rec, CONFIG_NODE *parent, const char *key,
return; return;
} }
if (node != NULL) if (node != NULL) {
if (strcmp(node->value, value) == 0)
return;
g_free(node->value); g_free(node->value);
else { } else {
node = g_new0(CONFIG_NODE, 1); node = g_new0(CONFIG_NODE, 1);
parent->value = g_slist_append(parent->value, node); parent->value = g_slist_append(parent->value, node);