[Commits] [SCM] claws branch, gtk2, updated. 3.19.1-74-g3d248d4be

wwp at claws-mail.org wwp at claws-mail.org
Sun Sep 24 19:44:28 UTC 2023


The branch, gtk2 has been updated
       via  3d248d4be65a414ed2870f0ac0b51ad85a831646 (commit)
      from  3587a66e1a43b5860a0615e0915fe53caa5facae (commit)

Summary of changes:
 src/compose.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 3d248d4be65a414ed2870f0ac0b51ad85a831646
Author: Paul <paul at claws-mail.org>
Date:   Sun Sep 24 17:59:24 2023 +0100

    when queueing or drafting a msg with an attachment which no longer exists, use the correct label on the button of the warning dialogue

diff --git a/src/compose.c b/src/compose.c
index f9e9854d3..b1be57fab 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -338,7 +338,8 @@ static ComposeQueueResult compose_queue_sub			(Compose	*compose,
 						 gboolean	perform_checks,
 						 gboolean 	remove_reedit_target);
 static int compose_add_attachments		(Compose	*compose,
-						 MimeInfo	*parent);
+						 MimeInfo	*parent,
+						 gint 		 action);
 static gchar *compose_get_header		(Compose	*compose);
 static gchar *compose_get_manual_headers_info	(Compose	*compose);
 
@@ -5928,7 +5929,7 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
 		g_node_append(mimempart->node, mimetext->node);
 		g_node_append(mimemsg->node, mimempart->node);
 
-		if (compose_add_attachments(compose, mimempart) < 0)
+		if (compose_add_attachments(compose, mimempart, action) < 0)
 			return COMPOSE_QUEUE_ERROR_NO_MSG;
 	} else
 		g_node_append(mimemsg->node, mimetext->node);
@@ -6416,7 +6417,7 @@ static ComposeQueueResult compose_queue_sub(Compose *compose, gint *msgnum, Fold
 	return COMPOSE_QUEUE_SUCCESS;
 }
 
-static int compose_add_attachments(Compose *compose, MimeInfo *parent)
+static int compose_add_attachments(Compose *compose, MimeInfo *parent, gint action)
 {
 	AttachInfo *ainfo;
 	GtkTreeView *tree_view = GTK_TREE_VIEW(compose->attach_clist);
@@ -6443,8 +6444,8 @@ static int compose_add_attachments(Compose *compose, MimeInfo *parent)
 		if (!is_file_exist(ainfo->file)) {
 			gchar *msg = g_strdup_printf(_("Attachment %s doesn't exist anymore. Ignore?"), ainfo->file);
 			AlertValue val = alertpanel_full(_("Warning"), msg,
-					_("Cancel sending"), _("Ignore attachment"), NULL,
-					ALERTFOCUS_FIRST, FALSE, NULL, ALERT_WARNING);
+					action == COMPOSE_WRITE_FOR_STORE? _("Cancel drafting"): _("Cancel sending"),
+					_("Ignore attachment"), NULL, ALERTFOCUS_FIRST, FALSE, NULL, ALERT_WARNING);
 			g_free(msg);
 			if (val == G_ALERTDEFAULT) {
 				return -1;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list