aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja5
-rw-r--r--libsylph/mbox.c16
3 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f7c567b..8a5c2996 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-11-25
+ * libsylph/mbox.c: proc_mbox_full(): only count for non-junk and
+ not-deleted and not-marked-as-read messages (thanks to Otinov
+ Sergey).
+
+2008-11-25
+
* src/foldersel.[ch]
src/summaryview.c
src/mainwindow.c: added message label to the folder selection
diff --git a/ChangeLog.ja b/ChangeLog.ja
index e878611e..fa9cbdfa 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,10 @@
2008-11-25
+ * libsylph/mbox.c: proc_mbox_full(): 非迷惑メール・非削除・未読の
+ メッセージのみカウントするようにした(Otinov Sergey さん thanks)。
+
+2008-11-25
+
* src/foldersel.[ch]
src/summaryview.c
src/mainwindow.c: フォルダ選択ダイアログにメッセージラベルを追加。
diff --git a/libsylph/mbox.c b/libsylph/mbox.c
index 72c2c5f4..17511697 100644
--- a/libsylph/mbox.c
+++ b/libsylph/mbox.c
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2007 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2008 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -113,6 +113,7 @@ gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
gchar *startp, *endp, *rpath;
gint empty_line;
gboolean is_next_msg = FALSE;
+ gboolean is_junk = FALSE;
FilterInfo *fltinfo;
if ((tmp_fp = g_fopen(tmp_file, "wb")) == NULL) {
@@ -218,6 +219,8 @@ gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
prefs_common.filter_junk_before) {
filter_apply(prefs_common.junk_fltlist, tmp_file,
fltinfo);
+ if (fltinfo->drop_done)
+ is_junk = TRUE;
}
if (!fltinfo->drop_done && apply_filter)
@@ -228,6 +231,8 @@ gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
!prefs_common.filter_junk_before) {
filter_apply(prefs_common.junk_fltlist, tmp_file,
fltinfo);
+ if (fltinfo->drop_done)
+ is_junk = TRUE;
}
if (fltinfo->actions[FLT_ACTION_MOVE] == FALSE &&
@@ -262,15 +267,18 @@ gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
}
}
+ if (!is_junk &&
+ fltinfo->actions[FLT_ACTION_DELETE] == FALSE &&
+ fltinfo->actions[FLT_ACTION_MARK_READ] == FALSE)
+ msgs++;
+
filter_info_free(fltinfo);
g_unlink(tmp_file);
-
- msgs++;
} while (from_line[0] != '\0');
g_free(tmp_file);
fclose(mbox_fp);
- debug_print(_("%d messages found.\n"), msgs);
+ debug_print("%d new messages found.\n", msgs);
return msgs;
}