aboutsummaryrefslogtreecommitdiff
path: root/src/inc.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-03-15 05:44:32 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-03-15 05:44:32 +0000
commitfeca1768884d6656a41bbc5b88a813b165db7b87 (patch)
treea3345b6f0891b5461ee95b8a740c35198c24992b /src/inc.c
parent590fb309cf9e7f617e829c48eba0a85e65187753 (diff)
apply flag changes in IMAP automatic filtering.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1569 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/inc.c')
-rw-r--r--src/inc.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/inc.c b/src/inc.c
index ca886372..81da2fb2 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -266,8 +266,9 @@ static gint inc_remote_account_mail(MainWindow *mainwin, PrefsAccount *account)
if (prefs_common.enable_junk &&
prefs_common.filter_junk_on_recv &&
prefs_common.filter_junk_before) {
- filter_apply_msginfo(prefs_common.junk_fltlist,
- msginfo, fltinfo);
+ filter_apply_msginfo
+ (prefs_common.manual_junk_fltlist,
+ msginfo, fltinfo);
}
if (!fltinfo->drop_done) {
@@ -279,8 +280,21 @@ static gint inc_remote_account_mail(MainWindow *mainwin, PrefsAccount *account)
prefs_common.enable_junk &&
prefs_common.filter_junk_on_recv &&
!prefs_common.filter_junk_before) {
- filter_apply_msginfo(prefs_common.junk_fltlist,
- msginfo, fltinfo);
+ filter_apply_msginfo
+ (prefs_common.manual_junk_fltlist,
+ msginfo, fltinfo);
+ }
+
+ if (msginfo->flags.perm_flags !=
+ fltinfo->flags.perm_flags) {
+ msginfo->flags = fltinfo->flags;
+ inbox->mark_dirty = TRUE;
+ if (fltinfo->actions[FLT_ACTION_MARK])
+ imap_msg_set_perm_flags
+ (msginfo, MSG_MARKED);
+ if (fltinfo->actions[FLT_ACTION_MARK_READ])
+ imap_msg_unset_perm_flags
+ (msginfo, MSG_NEW|MSG_UNREAD);
}
if (fltinfo->actions[FLT_ACTION_MOVE] &&