diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-11-02 10:18:53 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-11-02 10:18:53 +0000 |
commit | efb2528ff9a62784209a754de1cb183226d2f7be (patch) | |
tree | ee2199ef7ed3fa4020593675b02aab9ade8a2a2a /src/summaryview.c | |
parent | 51951630e709bef4be1f74be57a4856bbd72c4ff (diff) |
added an option to mark filtered junk mails as read.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@710 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/summaryview.c')
-rw-r--r-- | src/summaryview.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/summaryview.c b/src/summaryview.c index 43f63ec0..77d85e1d 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -3835,9 +3835,20 @@ static gboolean summary_filter_junk_func(GtkTreeModel *model, GtkTreePath *path, if (fltinfo->actions[FLT_ACTION_MOVE] || fltinfo->actions[FLT_ACTION_COPY] || - fltinfo->actions[FLT_ACTION_DELETE]) + fltinfo->actions[FLT_ACTION_DELETE] || + fltinfo->actions[FLT_ACTION_MARK_READ]) summaryview->filtered++; + if (msginfo->flags.perm_flags != fltinfo->flags.perm_flags) { + msginfo->flags = fltinfo->flags; + summary_set_row(summaryview, iter, msginfo); + if (MSG_IS_IMAP(msginfo->flags)) { + if (fltinfo->actions[FLT_ACTION_MARK_READ]) + imap_msg_unset_perm_flags(msginfo, + MSG_NEW|MSG_UNREAD); + } + } + if (fltinfo->actions[FLT_ACTION_MOVE] && fltinfo->move_dest) summary_move_row_to(summaryview, iter, fltinfo->move_dest); else if (fltinfo->actions[FLT_ACTION_DELETE]) @@ -3958,6 +3969,12 @@ static void summary_junk_func(GtkTreeModel *model, GtkTreePath *path, ret = filter_action_exec(&rule, msginfo, file, fltinfo); + if (ret == 0 && MSG_IS_UNREAD(msginfo->flags)) { + summary_mark_row_as_read(summaryview, iter); + if (MSG_IS_IMAP(msginfo->flags)) + imap_msg_unset_perm_flags + (msginfo, MSG_NEW | MSG_UNREAD); + } if (ret == 0 && fltinfo->actions[FLT_ACTION_MOVE] && fltinfo->move_dest) summary_move_row_to(summaryview, iter, fltinfo->move_dest); |