talons

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

commit c67b380f102cb8e056db83043ee26a1747ccd0c0
parent 00e24331e85b072bab1eb098c75bbd645ee5e06a
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 @@ -5274,6 +5274,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", @@ -5912,7 +5915,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 @@ -86,7 +86,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 {