From 595b6a4f6c2a6f12fb2b3c83f4053942844ffa84 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Jan 2013 17:52:51 +0100 Subject: ConfigFile: add enum ConfigOption Look up top-level config options by enum (= integer), not by name string. --- src/Main.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/Main.cxx') diff --git a/src/Main.cxx b/src/Main.cxx index ecea59843..a22ee6313 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -167,12 +167,11 @@ glue_mapper_init(GError **error_r) static bool glue_db_init_and_load(void) { - const struct config_param *param = config_get_param("database"); + const struct config_param *param = config_get_param(CONF_DATABASE); const struct config_param *path = config_get_param(CONF_DB_FILE); if (param != NULL && path != NULL) - g_message("Found both 'database' and '" CONF_DB_FILE - "' setting - ignoring the latter"); + g_message("Found both 'database' and 'db_file' setting - ignoring the latter"); GError *error = NULL; bool ret; @@ -180,10 +179,10 @@ glue_db_init_and_load(void) if (!mapper_has_music_directory()) { if (param != NULL) g_message("Found database setting without " - CONF_MUSIC_DIR " - disabling database"); + "music_directory - disabling database"); if (path != NULL) - g_message("Found " CONF_DB_FILE " setting without " - CONF_MUSIC_DIR " - disabling database"); + g_message("Found db_file setting without " + "music_directory - disabling database"); return true; } -- cgit v1.2.3