From db2c6209519ef73a1e7d7af4d4be5c30fbb4ba8f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 19 Dec 2000 17:42:56 +0000 Subject: [PATCH] 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 --- src/core/settings.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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;