Compare commits

..

2 Commits

Author SHA1 Message Date
017e6e8b9a Refactor code
Rename add_tags to autotags.
2018-07-07 11:28:51 +02:00
a3173fa1d8 Add encrypted tag to decrypted files 2018-07-07 11:25:02 +02:00

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,
gchar *filename, GList **add_tags,
gchar *filename, GList **autotags,
GtkListStore *entryListStore, GtkListStore *autoCompletion)
{
gchar *cmd = NULL;
@ -387,7 +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) {
g_message("GPG: Decryption OK!\n");
mdiary_add_file_to_store(mdiary_scanner, filename, cmd_stdout, *add_tags, entryListStore, autoCompletion);
*autotags = g_list_append(*autotags, "encrypted");
mdiary_add_file_to_store(mdiary_scanner, filename, cmd_stdout, *autotags, entryListStore, autoCompletion);
*autotags = g_list_remove(*autotags, g_list_last(*autotags)->data);
} else {
mdiary_scanner->entries_failed++;
mdiary_scanner->error_code |= MDS_ERROR_GPG;