X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/5d81d183a92497924d4f784426e9863a83998c83..3324c6858ba6891531d8bb2e3e0d15f5b413c441:/debian/patches/features/trash-folder?ds=inline diff --git a/debian/patches/features/trash-folder b/debian/patches/features/trash-folder index 718c082..96766a8 100644 --- a/debian/patches/features/trash-folder +++ b/debian/patches/features/trash-folder @@ -48,7 +48,7 @@ To sum up, it's more integrated and transparent to the user. == END PATCH --- a/commands.c +++ b/commands.c -@@ -688,6 +688,7 @@ int _mutt_save_message (HEADER *h, CONTE +@@ -716,6 +716,7 @@ if (option (OPTDELETEUNTAG)) mutt_set_flag (Context, h, M_TAG, 0); } @@ -58,7 +58,7 @@ To sum up, it's more integrated and transparent to the user. } --- a/flags.c +++ b/flags.c -@@ -69,7 +69,13 @@ void _mutt_set_flag (CONTEXT *ctx, HEADE +@@ -65,7 +65,13 @@ { h->deleted = 0; update = 1; @@ -73,7 +73,7 @@ To sum up, it's more integrated and transparent to the user. #ifdef USE_IMAP /* see my comment above */ if (ctx->magic == M_IMAP) -@@ -91,6 +97,17 @@ void _mutt_set_flag (CONTEXT *ctx, HEADE +@@ -87,6 +93,17 @@ } break; @@ -93,7 +93,7 @@ To sum up, it's more integrated and transparent to the user. if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN)) --- a/globals.h +++ b/globals.h -@@ -142,6 +142,7 @@ WHERE char *StChars; +@@ -139,6 +139,7 @@ WHERE char *Status; WHERE char *Tempdir; WHERE char *Tochars; @@ -103,7 +103,7 @@ To sum up, it's more integrated and transparent to the user. WHERE char *XtermTitle; --- a/imap/message.c +++ b/imap/message.c -@@ -816,6 +816,7 @@ int imap_copy_messages (CONTEXT* ctx, HE +@@ -867,6 +867,7 @@ if (ctx->hdrs[n]->tagged) { mutt_set_flag (ctx, ctx->hdrs[n], M_DELETE, 1); @@ -111,7 +111,7 @@ To sum up, it's more integrated and transparent to the user. if (option (OPTDELETEUNTAG)) mutt_set_flag (ctx, ctx->hdrs[n], M_TAG, 0); } -@@ -823,6 +824,7 @@ int imap_copy_messages (CONTEXT* ctx, HE +@@ -874,6 +875,7 @@ else { mutt_set_flag (ctx, h, M_DELETE, 1); @@ -121,9 +121,9 @@ To sum up, it's more integrated and transparent to the user. } --- a/init.h +++ b/init.h -@@ -2881,6 +2881,16 @@ struct option_t MuttVars[] = { +@@ -3190,6 +3190,16 @@ ** by \fIyou\fP. The sixth character is used to indicate when a mail - ** was sent to a mailing-list you subscribe to (default: L). + ** was sent to a mailing-list you subscribe to. */ + { "trash", DT_PATH, R_NONE, UL &TrashPath, 0 }, + /* @@ -140,7 +140,7 @@ To sum up, it's more integrated and transparent to the user. /* --- a/mutt.h +++ b/mutt.h -@@ -201,6 +201,7 @@ enum +@@ -187,6 +187,7 @@ M_DELETE, M_UNDELETE, M_DELETED, @@ -148,7 +148,7 @@ To sum up, it's more integrated and transparent to the user. M_FLAG, M_TAG, M_UNTAG, -@@ -712,6 +713,7 @@ typedef struct header +@@ -703,6 +704,7 @@ unsigned int mime : 1; /* has a MIME-Version header? */ unsigned int flagged : 1; /* marked important? */ unsigned int tagged : 1; @@ -156,7 +156,7 @@ To sum up, it's more integrated and transparent to the user. unsigned int deleted : 1; unsigned int changed : 1; unsigned int attach_del : 1; /* has an attachment marked for deletion */ -@@ -883,6 +885,7 @@ typedef struct _context +@@ -875,6 +877,7 @@ int new; /* how many new messages? */ int unread; /* how many unread messages? */ int deleted; /* how many deleted messages */ @@ -166,7 +166,7 @@ To sum up, it's more integrated and transparent to the user. --- a/muttlib.c +++ b/muttlib.c -@@ -1430,7 +1430,9 @@ int mutt_save_confirm (const char *s, st +@@ -1460,7 +1460,9 @@ if (magic > 0 && !mx_access (s, W_OK)) { @@ -179,7 +179,7 @@ To sum up, it's more integrated and transparent to the user. if ((rc = mutt_yesorno (tmp, M_YES)) == M_NO) --- a/mx.c +++ b/mx.c -@@ -803,6 +803,53 @@ static int sync_mailbox (CONTEXT *ctx, i +@@ -773,6 +773,53 @@ return rc; } @@ -233,7 +233,7 @@ To sum up, it's more integrated and transparent to the user. /* save changes and close mailbox */ int mx_close_mailbox (CONTEXT *ctx, int *index_hint) { -@@ -938,6 +985,7 @@ int mx_close_mailbox (CONTEXT *ctx, int +@@ -909,6 +956,7 @@ if (mutt_append_message (&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN) == 0) { mutt_set_flag (ctx, ctx->hdrs[i], M_DELETE, 1); @@ -241,12 +241,12 @@ To sum up, it's more integrated and transparent to the user. } else { -@@ -959,6 +1007,14 @@ int mx_close_mailbox (CONTEXT *ctx, int +@@ -931,6 +979,14 @@ return 0; } + /* copy mails to the trash before expunging */ -+ if (purge && ctx->deleted) ++ if (purge && ctx->deleted && mutt_strcmp(ctx->path, TrashPath)) + if (trash_append (ctx) != 0) + { + ctx->closing = 0; @@ -256,11 +256,11 @@ To sum up, it's more integrated and transparent to the user. #ifdef USE_IMAP /* allow IMAP to preserve the deleted flag across sessions */ if (ctx->magic == M_IMAP) -@@ -1154,6 +1210,12 @@ int mx_sync_mailbox (CONTEXT *ctx, int * +@@ -1130,6 +1186,12 @@ msgcount = ctx->msgcount; deleted = ctx->deleted; -+ if (purge && ctx->deleted) ++ if (purge && ctx->deleted && mutt_strcmp(ctx->path, TrashPath)) + { + if (trash_append (ctx) == -1) + return -1; @@ -271,7 +271,7 @@ To sum up, it's more integrated and transparent to the user. rc = imap_sync_mailbox (ctx, purge, index_hint); --- a/postpone.c +++ b/postpone.c -@@ -279,6 +279,9 @@ int mutt_get_postponed (CONTEXT *ctx, HE +@@ -276,6 +276,9 @@ /* finished with this message, so delete it. */ mutt_set_flag (PostContext, h, M_DELETE, 1);