}
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;
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:*";
}
{
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);
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;
Configuration *config_get_instance (void);
-gboolean config_load_from_file (Configuration *config, const gchar *path, GError **error);
+gboolean config_load_from_file (Configuration *config, const gchar *path, GList **messages, GError **error);
gboolean config_load_from_standard_locations (Configuration *config, const gchar *config_path, GList **messages);