diff -u mutt-1.5.20-trashfolder/OPS mutt-1.5.20-trash+purge/OPS
old
|
new
|
|
141 | 141 | OP_PREV_LINE "scroll up one line" |
142 | 142 | OP_PREV_PAGE "move to the previous page" |
143 | 143 | OP_PRINT "print the current entry" |
| 144 | OP_PURGE_MESSAGE "really delete the current entry, bypassing the trash folder" |
144 | 145 | OP_QUERY "query external program for addresses" |
145 | 146 | OP_QUERY_APPEND "append new query results to current results" |
146 | 147 | OP_QUIT "save changes to mailbox and quit" |
Common subdirectories: mutt-1.5.20-trashfolder/contrib and mutt-1.5.20-trash+purge/contrib
diff -u mutt-1.5.20-trashfolder/curs_main.c mutt-1.5.20-trash+purge/curs_main.c
old
|
new
|
|
1803 | 1803 | MAYBE_REDRAW (menu->redraw); |
1804 | 1804 | break; |
1805 | 1805 | |
| 1806 | case OP_PURGE_MESSAGE: |
1806 | 1807 | case OP_DELETE: |
1807 | 1808 | |
1808 | 1809 | CHECK_MSGCOUNT; |
… |
… |
|
1813 | 1814 | if (tag) |
1814 | 1815 | { |
1815 | 1816 | mutt_tag_set_flag (M_DELETE, 1); |
| 1817 | mutt_tag_set_flag (M_PURGED, (op != OP_PURGE_MESSAGE) ? 0 : 1); |
1816 | 1818 | if (option (OPTDELETEUNTAG)) |
1817 | 1819 | mutt_tag_set_flag (M_TAG, 0); |
1818 | 1820 | menu->redraw = REDRAW_INDEX; |
… |
… |
|
1820 | 1822 | else |
1821 | 1823 | { |
1822 | 1824 | mutt_set_flag (Context, CURHDR, M_DELETE, 1); |
| 1825 | mutt_set_flag (Context, CURHDR, M_PURGED, |
| 1826 | (op != OP_PURGE_MESSAGE) ? 0 : 1); |
1823 | 1827 | if (option (OPTDELETEUNTAG)) |
1824 | 1828 | mutt_set_flag (Context, CURHDR, M_TAG, 0); |
1825 | 1829 | if (option (OPTRESOLVE)) |
… |
… |
|
2116 | 2120 | if (tag) |
2117 | 2121 | { |
2118 | 2122 | mutt_tag_set_flag (M_DELETE, 0); |
| 2123 | mutt_tag_set_flag (M_PURGED, 0); |
2119 | 2124 | menu->redraw = REDRAW_INDEX; |
2120 | 2125 | } |
2121 | 2126 | else |
2122 | 2127 | { |
2123 | 2128 | mutt_set_flag (Context, CURHDR, M_DELETE, 0); |
| 2129 | mutt_set_flag (Context, CURHDR, M_PURGED, 0); |
2124 | 2130 | if (option (OPTRESOLVE) && menu->current < Context->vcount - 1) |
2125 | 2131 | { |
2126 | 2132 | menu->current++; |
… |
… |
|
2141 | 2147 | CHECK_ACL(M_ACL_DELETE, _("undelete message(s)")); |
2142 | 2148 | |
2143 | 2149 | rc = mutt_thread_set_flag (CURHDR, M_DELETE, 0, |
2144 | | op == OP_UNDELETE_THREAD ? 0 : 1); |
| 2150 | op == OP_UNDELETE_THREAD ? 0 : 1) |
| 2151 | + mutt_thread_set_flag (CURHDR, M_PURGED, 0, |
| 2152 | op == OP_UNDELETE_THREAD ? 0 : 1); |
2145 | 2153 | |
2146 | | if (rc != -1) |
| 2154 | if (rc > -1) |
2147 | 2155 | { |
2148 | 2156 | if (option (OPTRESOLVE)) |
2149 | 2157 | { |
Common subdirectories: mutt-1.5.20-trashfolder/doc and mutt-1.5.20-trash+purge/doc
diff -u mutt-1.5.20-trashfolder/flags.c mutt-1.5.20-trash+purge/flags.c
old
|
new
|
|
104 | 104 | } |
105 | 105 | break; |
106 | 106 | |
| 107 | case M_PURGED: |
| 108 | if (bf) |
| 109 | { |
| 110 | if (!h->purged) |
| 111 | h->purged = 1; |
| 112 | } |
| 113 | else if (h->purged) |
| 114 | h->purged = 0; |
| 115 | break; |
| 116 | |
107 | 117 | case M_NEW: |
108 | 118 | |
109 | 119 | if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN)) |
diff -u mutt-1.5.20-trashfolder/functions.h mutt-1.5.20-trash+purge/functions.h
old
|
new
|
|
120 | 120 | { "toggle-write", OP_TOGGLE_WRITE, "%" }, |
121 | 121 | { "next-thread", OP_MAIN_NEXT_THREAD, "\016" }, |
122 | 122 | { "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" }, |
| 123 | { "purge-message", OP_PURGE_MESSAGE, NULL }, |
123 | 124 | { "query", OP_QUERY, "Q" }, |
124 | 125 | { "quit", OP_QUIT, "q" }, |
125 | 126 | { "reply", OP_REPLY, "r" }, |
… |
… |
|
209 | 210 | { "print-message", OP_PRINT, "p" }, |
210 | 211 | { "previous-thread", OP_MAIN_PREV_THREAD, "\020" }, |
211 | 212 | { "previous-subthread",OP_MAIN_PREV_SUBTHREAD, "\033p" }, |
| 213 | { "purge-message", OP_PURGE_MESSAGE, NULL }, |
212 | 214 | { "quit", OP_QUIT, "Q" }, |
213 | 215 | { "exit", OP_EXIT, "q" }, |
214 | 216 | { "reply", OP_REPLY, "r" }, |
Common subdirectories: mutt-1.5.20-trashfolder/imap and mutt-1.5.20-trash+purge/imap
Common subdirectories: mutt-1.5.20-trashfolder/intl and mutt-1.5.20-trash+purge/intl
Common subdirectories: mutt-1.5.20-trashfolder/m4 and mutt-1.5.20-trash+purge/m4
diff -u mutt-1.5.20-trashfolder/mutt.h mutt-1.5.20-trash+purge/mutt.h
old
|
new
|
|
188 | 188 | M_UNDELETE, |
189 | 189 | M_DELETED, |
190 | 190 | M_APPENDED, |
| 191 | M_PURGED, |
191 | 192 | M_FLAG, |
192 | 193 | M_TAG, |
193 | 194 | M_UNTAG, |
… |
… |
|
704 | 705 | unsigned int tagged : 1; |
705 | 706 | unsigned int deleted : 1; |
706 | 707 | unsigned int appended : 1; /* has been saved */ |
| 708 | unsigned int purged : 1; /* bypassing the trash folder */ |
707 | 709 | unsigned int changed : 1; |
708 | 710 | unsigned int attach_del : 1; /* has an attachment marked for deletion */ |
709 | 711 | unsigned int old : 1; |
diff -u mutt-1.5.20-trashfolder/mx.c mutt-1.5.20-trash+purge/mx.c
old
|
new
|
|
803 | 803 | { |
804 | 804 | for (i = 0 ; i < ctx->msgcount ; i++) |
805 | 805 | if (ctx->hdrs[i]->deleted && !ctx->hdrs[i]->appended |
| 806 | && !ctx->hdrs[i]->purged |
806 | 807 | && mutt_append_message (ctx_trash, ctx, ctx->hdrs[i], 0, 0) == -1) |
807 | 808 | { |
808 | 809 | mx_close_mailbox (ctx_trash, NULL); |
diff -u mutt-1.5.20-trashfolder/pager.c mutt-1.5.20-trash+purge/pager.c
old
|
new
|
|
2309 | 2309 | MAYBE_REDRAW (redraw); |
2310 | 2310 | break; |
2311 | 2311 | |
| 2312 | case OP_PURGE_MESSAGE: |
2312 | 2313 | case OP_DELETE: |
2313 | 2314 | CHECK_MODE(IsHeader (extra)); |
2314 | 2315 | CHECK_READONLY; |
2315 | 2316 | CHECK_ACL(M_ACL_DELETE, _("delete message")); |
2316 | 2317 | |
2317 | 2318 | mutt_set_flag (Context, extra->hdr, M_DELETE, 1); |
| 2319 | mutt_set_flag (Context, extra->hdr, M_PURGED, |
| 2320 | ch != OP_PURGE_MESSAGE ? 0 : 1); |
2318 | 2321 | if (option (OPTDELETEUNTAG)) |
2319 | 2322 | mutt_set_flag (Context, extra->hdr, M_TAG, 0); |
2320 | 2323 | redraw = REDRAW_STATUS | REDRAW_INDEX; |
… |
… |
|
2641 | 2644 | CHECK_ACL(M_ACL_DELETE, _("undelete message")); |
2642 | 2645 | |
2643 | 2646 | mutt_set_flag (Context, extra->hdr, M_DELETE, 0); |
| 2647 | mutt_set_flag (Context, extra->hdr, M_PURGED, 0); |
2644 | 2648 | redraw = REDRAW_STATUS | REDRAW_INDEX; |
2645 | 2649 | if (option (OPTRESOLVE)) |
2646 | 2650 | { |
… |
… |
|
2656 | 2660 | CHECK_ACL(M_ACL_DELETE, _("undelete message(s)")); |
2657 | 2661 | |
2658 | 2662 | r = mutt_thread_set_flag (extra->hdr, M_DELETE, 0, |
| 2663 | ch == OP_UNDELETE_THREAD ? 0 : 1) |
| 2664 | + mutt_thread_set_flag (extra->hdr, M_PURGED, 0, |
2659 | 2665 | ch == OP_UNDELETE_THREAD ? 0 : 1); |
2660 | 2666 | |
2661 | | if (r != -1) |
| 2667 | if (r > -1) |
2662 | 2668 | { |
2663 | 2669 | if (option (OPTRESOLVE)) |
2664 | 2670 | { |
diff -u mutt-1.5.20-trashfolder/pattern.c mutt-1.5.20-trash+purge/pattern.c
old
|
new
|
|
1347 | 1347 | { |
1348 | 1348 | switch (op) |
1349 | 1349 | { |
1350 | | case M_DELETE: |
1351 | 1350 | case M_UNDELETE: |
| 1351 | mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_PURGED, |
| 1352 | 0); |
| 1353 | case M_DELETE: |
1352 | 1354 | mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_DELETE, |
1353 | 1355 | (op == M_DELETE)); |
1354 | 1356 | break; |