diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-10-20 06:24:46 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-10-20 06:24:46 +0800 |
commit | 260d58ea7515ae6f3b7c3abe3c40680b6ad7dd84 (patch) | |
tree | 5e5096b584058d7abcdb03e3336afef3d30c774f | |
parent | 43ea34eb6566d16bbe30100557bcd1e3c86e5a2a (diff) | |
download | gsoc2013-evolution-260d58ea7515ae6f3b7c3abe3c40680b6ad7dd84.tar gsoc2013-evolution-260d58ea7515ae6f3b7c3abe3c40680b6ad7dd84.tar.gz gsoc2013-evolution-260d58ea7515ae6f3b7c3abe3c40680b6ad7dd84.tar.bz2 gsoc2013-evolution-260d58ea7515ae6f3b7c3abe3c40680b6ad7dd84.tar.lz gsoc2013-evolution-260d58ea7515ae6f3b7c3abe3c40680b6ad7dd84.tar.xz gsoc2013-evolution-260d58ea7515ae6f3b7c3abe3c40680b6ad7dd84.tar.zst gsoc2013-evolution-260d58ea7515ae6f3b7c3abe3c40680b6ad7dd84.zip |
Start fetching at 1, not 0.
2000-10-19 Jeffrey Stedfast <fejj@helixcode.com>
* filter-driver.c (filter_driver_filter_folder): Start fetching at
1, not 0.
svn path=/trunk/; revision=6060
-rw-r--r-- | filter/ChangeLog | 5 | ||||
-rw-r--r-- | filter/filter-driver.c | 35 |
2 files changed, 23 insertions, 17 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index 67c957f1c6..0ee8b900cb 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,8 @@ +2000-10-19 Jeffrey Stedfast <fejj@helixcode.com> + + * filter-driver.c (filter_driver_filter_folder): Start fetching at + 1, not 0. + 2000-10-11 Not Zed <NotZed@HelixCode.com> * filter-driver.c (filter_driver_filter_mbox): Report the diff --git a/filter/filter-driver.c b/filter/filter-driver.c index 2e6c797ab6..f4863605a2 100644 --- a/filter/filter-driver.c +++ b/filter/filter-driver.c @@ -530,47 +530,48 @@ fail: /* will filter a folder */ void -filter_driver_filter_folder(FilterDriver *driver, CamelFolder *folder, const char *source, GPtrArray *uids, gboolean remove, CamelException *ex) +filter_driver_filter_folder (FilterDriver *driver, CamelFolder *folder, const char *source, + GPtrArray *uids, gboolean remove, CamelException *ex) { int i; int freeuids = FALSE; CamelMimeMessage *message; const CamelMessageInfo *info; - + if (uids == NULL) { - uids = camel_folder_get_uids(folder); + uids = camel_folder_get_uids (folder); freeuids = TRUE; } - - for (i=0;i<uids->len;i++) { - - report_status(driver, FILTER_STATUS_START, "Getting message %d of %d", i, uids->len); - + + for (i = 0; i < uids->len; i++) { + report_status (driver, FILTER_STATUS_START, "Getting message %d of %d", i+1, uids->len); + message = camel_folder_get_message (folder, uids->pdata[i], ex); if (camel_exception_is_set (ex)) { - report_status(driver, FILTER_STATUS_END, "Failed at message %d of %d", i, uids->len); + report_status (driver, FILTER_STATUS_END, "Failed at message %d of %d", i+1, uids->len); break; } - + if (camel_folder_has_summary_capability (folder)) info = camel_folder_get_message_info (folder, uids->pdata[i]); else info = NULL; - filter_driver_filter_message(driver, message, (CamelMessageInfo *)info, source, ex); + filter_driver_filter_message (driver, message, (CamelMessageInfo *)info, source, ex); if (camel_exception_is_set (ex)) { - report_status(driver, FILTER_STATUS_END, "Failed at message %d of %d", i, uids->len); + report_status (driver, FILTER_STATUS_END, "Failed at message %d of %d", i+1, uids->len); break; } - + if (remove) - camel_folder_set_message_flags (folder, uids->pdata[i], CAMEL_MESSAGE_DELETED,CAMEL_MESSAGE_DELETED); - + camel_folder_set_message_flags (folder, uids->pdata[i], + CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED); + camel_object_unref (CAMEL_OBJECT (message)); } - + if (freeuids) - camel_folder_free_uids(folder, uids); + camel_folder_free_uids (folder, uids); } gboolean |