diff options
author | Timo Sirainen <cras@irssi.org> | 2000-12-19 17:42:56 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-12-19 17:42:56 +0000 |
commit | db2c6209519ef73a1e7d7af4d4be5c30fbb4ba8f (patch) | |
tree | 990dfb19bb7680e7051329f5d19920fdce4e59de /src | |
parent | 2e9487d42a2a146ac48eda291bda82d8ed175b6e (diff) | |
download | irssi-db2c6209519ef73a1e7d7af4d4be5c30fbb4ba8f.zip |
when changing config file to new format send "setup changed" signal at
startup so that some settings that were tried to be used before
settings_check() was called would be properly loaded.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1015 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/core/settings.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/settings.c b/src/core/settings.c index 5baf7a70..7b13b618 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -34,6 +34,7 @@ CONFIG_REC *mainconfig; static GString *last_errors; static char *last_config_error_msg; static int fe_initialized; +static int config_changed; /* FIXME: remove after .98 (unless needed again) */ static GHashTable *settings; static int timeout_tag; @@ -276,6 +277,12 @@ static void sig_init_finished(void) signal_emit("gui dialog", 2, "error", last_config_error_msg); g_free_and_null(last_config_error_msg); } + + if (config_changed) { + /* some backwards compatibility changes were made to + config file, reload it */ + signal_emit("setup changed", 0); + } } /* FIXME: remove after 0.7.98 - only for backward compatibility */ @@ -288,6 +295,8 @@ static void settings_move(SETTINGS_REC *rec, char *value) iconfig_node_set_str(node, rec->key, value); iconfig_node_set_str(setnode, rec->key, NULL); + + config_changed = TRUE; } /* verify that all settings in config file for `module' are actually found @@ -580,6 +589,7 @@ void settings_init(void) last_errors = NULL; last_config_error_msg = NULL; fe_initialized = FALSE; + config_changed = FALSE; config_last_mtime = 0; config_last_modifycounter = 0; |