diff options
Diffstat (limited to 'common/configuration.c')
-rw-r--r-- | common/configuration.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/configuration.c b/common/configuration.c index c150d868..250d052b 100644 --- a/common/configuration.c +++ b/common/configuration.c @@ -34,7 +34,7 @@ config_get_instance (void) } gboolean -config_load_from_file (Configuration *config, const gchar *path, GError **error) +config_load_from_file (Configuration *config, const gchar *path, GList **messages, GError **error) { GKeyFile *key_file; gchar *source_path, **groups; @@ -60,7 +60,8 @@ config_load_from_file (Configuration *config, const gchar *path, GError **error) group = groups[i]; if (strcmp (group, "SeatDefaults") == 0) { - g_printerr ("Configuration file %s contains a deprecated [SeatDefaults] section, use [Seat:*] instead\n", path); + if (messages) + *messages = g_list_append (*messages, g_strdup (" [SeatDefaults] is now called [Seat:*], please update this configuration")); group = "Seat:*"; } @@ -145,7 +146,7 @@ load_config_directory (const gchar *path, GList **messages) { if (messages) *messages = g_list_append (*messages, g_strdup_printf ("Loading configuration from %s", conf_path)); - config_load_from_file (config_get_instance (), conf_path, &error); + config_load_from_file (config_get_instance (), conf_path, messages, &error); if (error && !g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) g_printerr ("Failed to load configuration from %s: %s\n", filename, error->message); g_clear_error (&error); @@ -202,7 +203,7 @@ config_load_from_standard_locations (Configuration *config, const gchar *config_ if (messages) *messages = g_list_append (*messages, g_strdup_printf ("Loading configuration from %s", path)); - if (!config_load_from_file (config, path, &error)) + if (!config_load_from_file (config, path, messages, &error)) { gboolean is_empty; |