Refactor code

Rename add_tags to autotags.
This commit is contained in:
Markus Koch 2018-07-07 11:28:51 +02:00
parent a3173fa1d8
commit 017e6e8b9a

View File

@ -375,7 +375,7 @@ static void mdiary_add_file_to_store(struct mdiary_scanner *mdiary_scanner,
} }
static void mdiary_add_gpg_to_store(struct mdiary_scanner *mdiary_scanner, static void mdiary_add_gpg_to_store(struct mdiary_scanner *mdiary_scanner,
gchar *filename, GList **add_tags, gchar *filename, GList **autotags,
GtkListStore *entryListStore, GtkListStore *autoCompletion) GtkListStore *entryListStore, GtkListStore *autoCompletion)
{ {
gchar *cmd = NULL; gchar *cmd = NULL;
@ -387,9 +387,9 @@ static void mdiary_add_gpg_to_store(struct mdiary_scanner *mdiary_scanner,
if (g_spawn_command_line_sync(cmd, &cmd_stdout, &cmd_stderr, &exit_status, NULL) && exit_status == 0) { if (g_spawn_command_line_sync(cmd, &cmd_stdout, &cmd_stderr, &exit_status, NULL) && exit_status == 0) {
g_message("GPG: Decryption OK!\n"); g_message("GPG: Decryption OK!\n");
*add_tags = g_list_append(*add_tags, "encrypted"); *autotags = g_list_append(*autotags, "encrypted");
mdiary_add_file_to_store(mdiary_scanner, filename, cmd_stdout, *add_tags, entryListStore, autoCompletion); mdiary_add_file_to_store(mdiary_scanner, filename, cmd_stdout, *autotags, entryListStore, autoCompletion);
*add_tags = g_list_remove(*add_tags, g_list_last(*add_tags)->data); *autotags = g_list_remove(*autotags, g_list_last(*autotags)->data);
} else { } else {
mdiary_scanner->entries_failed++; mdiary_scanner->entries_failed++;
mdiary_scanner->error_code |= MDS_ERROR_GPG; mdiary_scanner->error_code |= MDS_ERROR_GPG;