when user cancels the signing passphrase dialogue, don't bother the user with an...
authorPaul <paul@claws-mail.org>
Mon, 18 Nov 2019 13:07:48 +0000 (13:07 +0000)
committerPaul <paul@claws-mail.org>
Mon, 18 Nov 2019 13:07:48 +0000 (13:07 +0000)
src/compose.c
src/compose.h

index fc89629..7a0ab83 100644 (file)
@@ -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);
index d0d920a..6fd032a 100644 (file)
@@ -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 {