talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit e39dd37bd199e17f225ee088011b47cd470c09b2
parent 4b94a12f82591727e40df50165aa601899a3923f
Author: Paul <paul@claws-mail.org>
Date:   Mon, 18 Nov 2019 13:07:48 +0000

when user cancels the signing passphrase dialogue, don't bother the user with an "error" dialogue

Diffstat:
Msrc/compose.c | 8+++++++-
Msrc/compose.h | 3++-
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/compose.c b/src/compose.c @@ -5276,6 +5276,9 @@ static void _display_queue_error(ComposeQueueResult val) alertpanel_error(_("Could not queue message for sending:\n\n" "Couldn't get recipient encryption key.")); break; + case COMPOSE_QUEUE_SIGNING_CANCELLED: + debug_print("signing cancelled\n"); + break; default: /* unhandled error */ debug_print("oops, unhandled compose_queue() return value %d\n", @@ -5914,7 +5917,10 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool compose->account, from_addr)) { g_free(from_name); g_free(from_addr); - return COMPOSE_QUEUE_ERROR_SIGNING_FAILED; + if (!privacy_peek_error()) + return COMPOSE_QUEUE_SIGNING_CANCELLED; + else + return COMPOSE_QUEUE_ERROR_SIGNING_FAILED; } g_free(from_name); g_free(from_addr); diff --git a/src/compose.h b/src/compose.h @@ -92,7 +92,8 @@ typedef enum COMPOSE_QUEUE_ERROR_SIGNING_FAILED = -3, COMPOSE_QUEUE_ERROR_ENCRYPT_FAILED = -4, COMPOSE_QUEUE_ERROR_CHAR_CONVERSION = -5, - COMPOSE_QUEUE_ERROR_NO_ENCRYPTION_KEY = -6 + COMPOSE_QUEUE_ERROR_NO_ENCRYPTION_KEY = -6, + COMPOSE_QUEUE_SIGNING_CANCELLED = -7 } ComposeQueueResult; typedef enum {