aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja4
-rw-r--r--src/inc.c13
3 files changed, 19 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 345826e5..5725450d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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() あるいは
diff --git a/src/inc.c b/src/inc.c
index 6c7dece1..c9228252 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -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++;
}