diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-02-01 10:34:00 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-02-01 10:34:00 +0000 |
commit | dfe3a16ff4cc92ff2160b1e2118de1d6222f0480 (patch) | |
tree | 0511ab152f0f4a56ad191dab01c5b76ee575471a /src/inc.c | |
parent | 47e5c73b0c0d9260476a3ec7dd6eb8dbf22dfde7 (diff) |
properly count the number of new messages on local and remote mailboxes.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@958 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/inc.c')
-rw-r--r-- | src/inc.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -152,7 +152,7 @@ static void inc_finished(MainWindow *mainwin, gint new_messages) debug_print("inc_finished(): %d new message(s)\n", new_messages); if (prefs_common.scan_all_after_inc) - folderview_check_new(NULL); + new_messages += folderview_check_new(NULL); if (new_messages > 0) { gchar buf[1024]; @@ -237,24 +237,25 @@ void inc_mail(MainWindow *mainwin) static gint inc_remote_account_mail(MainWindow *mainwin, PrefsAccount *account) { FolderItem *item = mainwin->summaryview->folder_item; + gint new_msgs; g_return_val_if_fail(account->folder != NULL, 0); if (account->protocol == A_IMAP4 && account->imap_check_inbox_only) { FolderItem *inbox = FOLDER(account->folder)->inbox; - folderview_check_new_item(inbox); + new_msgs = folderview_check_new_item(inbox); if (!prefs_common.scan_all_after_inc && item != NULL && inbox == item) folderview_update_item(item, TRUE); } else { - folderview_check_new(FOLDER(account->folder)); + new_msgs = folderview_check_new(FOLDER(account->folder)); if (!prefs_common.scan_all_after_inc && item != NULL && FOLDER(account->folder) == item->folder) folderview_update_item(item, TRUE); } - return 1; + return new_msgs; } static gint inc_account_mail_real(MainWindow *mainwin, PrefsAccount *account) @@ -327,7 +328,7 @@ void inc_all_account_mail(MainWindow *mainwin, gboolean autocheck) PrefsAccount *account = list->data; if ((account->protocol == A_IMAP4 || account->protocol == A_NNTP) && account->recv_at_getall) - inc_remote_account_mail(mainwin, account); + new_msgs += inc_remote_account_mail(mainwin, account); } /* check POP3 accounts */ |