size_t length);
notmuch_bool_t
-notmuch_config_get_maildir_sync (notmuch_config_t *config);
+notmuch_config_get_maildir_synchronize_flags (notmuch_config_t *config);
void
-notmuch_config_set_maildir_sync (notmuch_config_t *config,
- notmuch_bool_t maildir_sync);
+notmuch_config_set_maildir_synchronize_flags (notmuch_config_t *config,
+ notmuch_bool_t synchronize_flags);
notmuch_bool_t
debugger_is_active (void);
size_t user_other_email_length;
const char **new_tags;
size_t new_tags_length;
- notmuch_bool_t maildir_sync;
+ notmuch_bool_t maildir_synchronize_flags;
};
#define MAILDIR_SYNC_UNDEF ((notmuch_bool_t)-1)
config->user_other_email_length = 0;
config->new_tags = NULL;
config->new_tags_length = 0;
- config->maildir_sync = MAILDIR_SYNC_UNDEF;
+ config->maildir_synchronize_flags = MAILDIR_SYNC_UNDEF;
if (! g_key_file_load_from_file (config->key_file,
config->filename,
notmuch_config_set_new_tags (config, tags, 2);
}
- if (notmuch_config_get_maildir_sync (config) == MAILDIR_SYNC_UNDEF) {
- notmuch_config_set_maildir_sync (config, FALSE);
+ if (notmuch_config_get_maildir_synchronize_flags (config) == MAILDIR_SYNC_UNDEF) {
+ notmuch_config_set_maildir_synchronize_flags (config, FALSE);
}
/* Whenever we know of configuration sections that don't appear in
}
notmuch_bool_t
-notmuch_config_get_maildir_sync (notmuch_config_t *config)
+notmuch_config_get_maildir_synchronize_flags (notmuch_config_t *config)
{
GError *err = NULL;
- if (config->maildir_sync == MAILDIR_SYNC_UNDEF) {
- config->maildir_sync =
+ if (config->maildir_synchronize_flags == MAILDIR_SYNC_UNDEF) {
+ config->maildir_synchronize_flags =
g_key_file_get_boolean (config->key_file,
"maildir", "synchronize_flags", &err);
if (err) {
- config->maildir_sync = MAILDIR_SYNC_UNDEF;
+ config->maildir_synchronize_flags = MAILDIR_SYNC_UNDEF;
g_error_free (err);
}
}
- return config->maildir_sync;
+ return config->maildir_synchronize_flags;
}
void
-notmuch_config_set_maildir_sync (notmuch_config_t *config,
- notmuch_bool_t maildir_sync)
+notmuch_config_set_maildir_synchronize_flags (notmuch_config_t *config,
+ notmuch_bool_t synchronize_flags)
{
g_key_file_set_boolean (config->key_file,
- "maildir", "synchronize_flags", maildir_sync);
- config->maildir_sync = maildir_sync;
+ "maildir", "synchronize_flags", synchronize_flags);
+ config->maildir_synchronize_flags = synchronize_flags;
}
_filename_list_t *removed_files;
_filename_list_t *removed_directories;
- notmuch_bool_t maildir_sync;
+ notmuch_bool_t synchronize_flags;
} add_files_state_t;
static volatile sig_atomic_t do_add_files_print_progress = 0;
state->added_messages++;
for (tag=state->new_tags; *tag != NULL; tag++)
notmuch_message_add_tag (message, *tag);
- if (state->maildir_sync == TRUE)
+ if (state->synchronize_flags == TRUE)
notmuch_message_maildir_to_tags (message, next);
break;
/* Non-fatal issues (go on to next file) */
case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:
- if (state->maildir_sync == TRUE)
+ if (state->synchronize_flags == TRUE)
notmuch_message_maildir_to_tags (message, next);
break;
case NOTMUCH_STATUS_FILE_NOT_EMAIL:
return 1;
add_files_state.new_tags = notmuch_config_get_new_tags (config, &add_files_state.new_tags_length);
- add_files_state.maildir_sync = notmuch_config_get_maildir_sync (config);
+ add_files_state.synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config);
db_path = notmuch_config_get_database_path (config);
dot_notmuch_path = talloc_asprintf (ctx, "%s/%s", db_path, ".notmuch");
return 1;
notmuch_database_set_maildir_sync (notmuch,
- notmuch_config_get_maildir_sync (config));
+ notmuch_config_get_maildir_synchronize_flags (config));
if (argc) {
input = fopen (argv[0], "r");
if (input == NULL) {
}
prompt ("Synchronize maildir flags with notmuch tags? %s: ",
- notmuch_config_get_maildir_sync (config) == TRUE ? "[yes]/no" : "[no]/yes");
+ notmuch_config_get_maildir_synchronize_flags (config) == TRUE ? "[yes]/no" : "[no]/yes");
if (strlen (response) > 0) {
if (strcasecmp (response, "yes") == 0||
strcasecmp (response, "y") == 0)
- notmuch_config_set_maildir_sync (config, TRUE);
+ notmuch_config_set_maildir_synchronize_flags (config, TRUE);
else
- notmuch_config_set_maildir_sync (config, FALSE);
+ notmuch_config_set_maildir_synchronize_flags (config, FALSE);
}
if (! notmuch_config_save (config)) {
if (notmuch == NULL)
return 1;
notmuch_database_set_maildir_sync (notmuch,
- notmuch_config_get_maildir_sync (config));
+ notmuch_config_get_maildir_synchronize_flags (config));
query = notmuch_query_create (notmuch, query_string);
if (query == NULL) {