projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
flags.c
diff --git
a/flags.c
b/flags.c
index
bc57bb9
..
fd3333f
100644
(file)
--- a/
flags.c
+++ b/
flags.c
@@
-29,6
+29,7
@@
void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx)
int changed = h->changed;
int deleted = ctx->deleted;
int tagged = ctx->tagged;
int changed = h->changed;
int deleted = ctx->deleted;
int tagged = ctx->tagged;
+ int flagged = ctx->flagged;
if (ctx->readonly && flag != M_TAG)
return; /* don't modify anything if we are read-only */
if (ctx->readonly && flag != M_TAG)
return; /* don't modify anything if we are read-only */
@@
-36,13
+37,8
@@
void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx)
switch (flag) {
case M_DELETE:
switch (flag) {
case M_DELETE:
-#ifdef USE_IMAP
- if (ctx && ctx->magic == M_IMAP)
- if (mutt_bit_isset (((IMAP_DATA *) ctx->data)->capabilities, ACL)
- && !mutt_bit_isset (((IMAP_DATA *) ctx->data)->rights,
- IMAP_ACL_DELETE))
- return;
-#endif
+ if (!mx_acl_check (ctx, ACL_DELETE))
+ return;
if (bf) {
if (!h->deleted && !ctx->readonly) {
if (bf) {
if (!h->deleted && !ctx->readonly) {
@@
-110,13
+106,8
@@
void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx)
case M_NEW:
case M_NEW:
-#ifdef USE_IMAP
- if (ctx && ctx->magic == M_IMAP)
- if (mutt_bit_isset (((IMAP_DATA *) ctx->data)->capabilities, ACL)
- && !mutt_bit_isset (((IMAP_DATA *) ctx->data)->rights,
- IMAP_ACL_SEEN))
- return;
-#endif
+ if (!mx_acl_check (ctx, ACL_SEEN))
+ return;
if (bf) {
if (h->read || h->old) {
if (bf) {
if (h->read || h->old) {
@@
-148,13
+139,8
@@
void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx)
case M_OLD:
case M_OLD:
-#ifdef USE_IMAP
- if (ctx && ctx->magic == M_IMAP)
- if (mutt_bit_isset (((IMAP_DATA *) ctx->data)->capabilities, ACL)
- && !mutt_bit_isset (((IMAP_DATA *) ctx->data)->rights,
- IMAP_ACL_SEEN))
- return;
-#endif
+ if (!mx_acl_check (ctx, ACL_SEEN))
+ return;
if (bf) {
if (!h->old) {
if (bf) {
if (!h->old) {
@@
-180,13
+166,8
@@
void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx)
case M_READ:
case M_READ:
-#ifdef USE_IMAP
- if (ctx && ctx->magic == M_IMAP)
- if (mutt_bit_isset (((IMAP_DATA *) ctx->data)->capabilities, ACL)
- && !mutt_bit_isset (((IMAP_DATA *) ctx->data)->rights,
- IMAP_ACL_SEEN))
- return;
-#endif
+ if (!mx_acl_check (ctx, ACL_SEEN))
+ return;
if (bf) {
if (!h->read) {
if (bf) {
if (!h->read) {
@@
-216,13
+197,8
@@
void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx)
case M_REPLIED:
case M_REPLIED:
-#ifdef USE_IMAP
- if (ctx && ctx->magic == M_IMAP)
- if (mutt_bit_isset (((IMAP_DATA *) ctx->data)->capabilities, ACL)
- && !mutt_bit_isset (((IMAP_DATA *) ctx->data)->rights,
- IMAP_ACL_WRITE))
- return;
-#endif
+ if (!mx_acl_check (ctx, ACL_WRITE))
+ return;
if (bf) {
if (!h->replied) {
if (bf) {
if (!h->replied) {
@@
-250,13
+226,8
@@
void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx)
case M_FLAG:
case M_FLAG:
-#ifdef USE_IMAP
- if (ctx && ctx->magic == M_IMAP)
- if (mutt_bit_isset (((IMAP_DATA *) ctx->data)->capabilities, ACL)
- && !mutt_bit_isset (((IMAP_DATA *) ctx->data)->rights,
- IMAP_ACL_WRITE))
- return;
-#endif
+ if (!mx_acl_check (ctx, ACL_WRITE))
+ return;
if (bf) {
if (!h->flagged) {
if (bf) {
if (!h->flagged) {
@@
-300,9
+271,8
@@
void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx)
* search results so that any future search will match the current status
* of this message and not what it was at the time it was last searched.
*/
* search results so that any future search will match the current status
* of this message and not what it was at the time it was last searched.
*/
- if (h->searched
- && (changed != h->changed || deleted != ctx->deleted
- || tagged != ctx->tagged))
+ if (h->searched && (changed != h->changed || deleted != ctx->deleted ||
+ tagged != ctx->tagged || flagged != ctx->flagged))
h->searched = 0;
sidebar_draw (0);
}
h->searched = 0;
sidebar_draw (0);
}