diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-10-04 00:53:58 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-10-04 00:53:58 +0000 |
commit | 20c3a3f30e98363684e62277d4fe45d2ab70406c (patch) | |
tree | 8cad7563936c4933e01f6bd7b5e550b14cc4c828 | |
parent | 48663e5834d29b40fc7438dd832af4fb4e8816f9 (diff) |
exclude junk mails from the number of new messages.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1208 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 4 | ||||
-rw-r--r-- | src/inc.c | 13 |
3 files changed, 19 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2006-10-04 + + * src/inc.c: inc_drop_message(): exclude junk mails from the number of + new messages. + 2006-10-03 * libsylph/socket.c: win32: fd_read(), fd_write(): if recv() or send() diff --git a/ChangeLog.ja b/ChangeLog.ja index 2819884c..62a00234 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,7 @@ +2006-10-04 + + * src/inc.c: inc_drop_message(): 新着メッセージ数から迷惑メールを除外。 + 2006-10-03 * libsylph/socket.c: win32: fd_read(), fd_write(): recv() あるいは @@ -1045,6 +1045,7 @@ static gint inc_drop_message(Pop3Session *session, const gchar *file) FilterInfo *fltinfo; IncSession *inc_session = (IncSession *)(SESSION(session)->data); gint val; + gboolean is_junk = FALSE; g_return_val_if_fail(inc_session != NULL, DROP_ERROR); @@ -1065,8 +1066,11 @@ static gint inc_drop_message(Pop3Session *session, const gchar *file) if (prefs_common.enable_junk && prefs_common.filter_junk_on_recv && - prefs_common.filter_junk_before) + prefs_common.filter_junk_before) { filter_apply(prefs_common.junk_fltlist, file, fltinfo); + if (fltinfo->drop_done) + is_junk = TRUE; + } if (!fltinfo->drop_done && session->ac_prefs->filter_on_recv) filter_apply(prefs_common.fltlist, file, fltinfo); @@ -1074,8 +1078,11 @@ static gint inc_drop_message(Pop3Session *session, const gchar *file) if (!fltinfo->drop_done) { if (prefs_common.enable_junk && prefs_common.filter_junk_on_recv && - !prefs_common.filter_junk_before) + !prefs_common.filter_junk_before) { filter_apply(prefs_common.junk_fltlist, file, fltinfo); + if (fltinfo->drop_done) + is_junk = TRUE; + } } if (!fltinfo->drop_done) { @@ -1105,7 +1112,7 @@ static gint inc_drop_message(Pop3Session *session, const gchar *file) val = DROP_DELETE; else { val = DROP_OK; - if (fltinfo->actions[FLT_ACTION_MARK_READ] == FALSE) + if (!is_junk && fltinfo->actions[FLT_ACTION_MARK_READ] == FALSE) inc_session->new_msgs++; } |