aboutsummaryrefslogtreecommitdiff
path: root/src/inc.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-10-03 04:04:37 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-10-03 04:04:37 +0000
commit9c8bbafa020c817e75e60615d954a05a63e4f76b (patch)
treea47c414d42529bbd7310f1cdd6eac06a4082bbcb /src/inc.c
parent33f6d712c179ed3dcaec1fe22b043b0c36d962e3 (diff)
exclude messages marked as read when counting new messages.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1206 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/inc.c')
-rw-r--r--src/inc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/inc.c b/src/inc.c
index 587e68c1..6c7dece1 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -462,9 +462,14 @@ static IncSession *inc_session_new(PrefsAccount *account)
session_set_recv_data_notify(session->session,
inc_recv_data_finished, session);
+ session->inc_state = INC_SUCCESS;
+
session->folder_table = g_hash_table_new(NULL, NULL);
session->tmp_folder_table = g_hash_table_new(NULL, NULL);
+ session->cur_total_bytes = 0;
+ session->new_msgs = 0;
+
return session;
}
@@ -597,7 +602,7 @@ static gint inc_start(IncProgressDialog *inc_dialog)
break;
}
- new_msgs += pop3_session->cur_total_num;
+ new_msgs += session->new_msgs;
if (!prefs_common.scan_all_after_inc) {
folder_item_scan_foreach(session->folder_table);
@@ -1098,8 +1103,11 @@ static gint inc_drop_message(Pop3Session *session, const gchar *file)
val = DROP_DONT_RECEIVE;
else if (fltinfo->actions[FLT_ACTION_DELETE] == TRUE)
val = DROP_DELETE;
- else
+ else {
val = DROP_OK;
+ if (fltinfo->actions[FLT_ACTION_MARK_READ] == FALSE)
+ inc_session->new_msgs++;
+ }
filter_info_free(fltinfo);