X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-config.c;h=0193401fe4b531df971a0b80933ccee709fc5745;hp=1b079e857d030e894dd4daed5fa5b306b9e1e2b6;hb=4c79a2dabe38ac72eb9eb21620f2ffca5f1885c6;hpb=33382c2b5ba2537952a60ea378feff36961e4713 diff --git a/notmuch-config.c b/notmuch-config.c index 1b079e85..0193401f 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -119,7 +119,6 @@ struct _notmuch_config { bool is_new; char *database_path; - char *crypto_gpg_path; char *user_name; char *user_primary_email; const char **user_other_email; @@ -325,7 +324,7 @@ get_config_from_file (notmuch_config_t *config, bool create_new) notmuch_config_t * notmuch_config_open (void *ctx, const char *filename, - notmuch_config_mode_t config_mode) + notmuch_command_mode_t config_mode) { GError *error = NULL; size_t tmp; @@ -360,8 +359,8 @@ notmuch_config_open (void *ctx, config->key_file = g_key_file_new (); - if (config_mode & NOTMUCH_CONFIG_OPEN) { - bool create_new = (config_mode & NOTMUCH_CONFIG_CREATE) != 0; + if (config_mode & NOTMUCH_COMMAND_CONFIG_OPEN) { + bool create_new = (config_mode & NOTMUCH_COMMAND_CONFIG_CREATE) != 0; if (! get_config_from_file (config, create_new)) { talloc_free (config); @@ -511,6 +510,9 @@ notmuch_config_close (notmuch_config_t *config) talloc_free (config); } +const char *_notmuch_config_get_path (notmuch_config_t *config) { + return config->filename; +} /* Save any changes made to the notmuch configuration. * * Any comments originally in the file will be preserved. @@ -1103,7 +1105,7 @@ notmuch_config_command_list (notmuch_config_t *config) } int -notmuch_config_command (notmuch_config_t *config, int argc, char *argv[]) +notmuch_config_command (notmuch_config_t *config, unused(notmuch_database_t *notmuch), int argc, char *argv[]) { int ret; int opt_index;