diff options
author | Not Zed <NotZed@Ximian.com> | 2001-01-22 14:24:30 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-01-22 14:24:30 +0800 |
commit | 0175b0b3eaf4a327e0627b14d7b93e6875e765d8 (patch) | |
tree | 25f267b74e06acbbfee6a5b02ab68692d891cd86 | |
parent | 6adb44b607e483357a6784ce75c26f411be143b0 (diff) | |
download | gsoc2013-evolution-0175b0b3eaf4a327e0627b14d7b93e6875e765d8.tar gsoc2013-evolution-0175b0b3eaf4a327e0627b14d7b93e6875e765d8.tar.gz gsoc2013-evolution-0175b0b3eaf4a327e0627b14d7b93e6875e765d8.tar.bz2 gsoc2013-evolution-0175b0b3eaf4a327e0627b14d7b93e6875e765d8.tar.lz gsoc2013-evolution-0175b0b3eaf4a327e0627b14d7b93e6875e765d8.tar.xz gsoc2013-evolution-0175b0b3eaf4a327e0627b14d7b93e6875e765d8.tar.zst gsoc2013-evolution-0175b0b3eaf4a327e0627b14d7b93e6875e765d8.zip |
When removing phantom nodes, check for the end node too.
2001-01-22 Not Zed <NotZed@Ximian.com>
* camel-folder-thread.c (camel_folder_thread_messages_new): When
removing phantom nodes, check for the end node too.
* camel-filter-driver.[ch]: Changed status vars to be
CAMEL_FILTER_STATUS_ etc.
svn path=/trunk/; revision=7700
-rw-r--r-- | camel/ChangeLog | 8 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 24 | ||||
-rw-r--r-- | camel/camel-filter-driver.h | 10 | ||||
-rw-r--r-- | camel/camel-folder-thread.c | 2 |
4 files changed, 26 insertions, 18 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index ef231bad33..352268c95d 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,11 @@ +2001-01-22 Not Zed <NotZed@Ximian.com> + + * camel-folder-thread.c (camel_folder_thread_messages_new): When + removing phantom nodes, check for the end node too. + + * camel-filter-driver.[ch]: Changed status vars to be + CAMEL_FILTER_STATUS_ etc. + 2001-01-21 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_param_list_format_append): Make the diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index 21055781f7..2d74d7098f 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -493,7 +493,7 @@ close_folder (void *key, void *value, void *data) CamelFilterDriver *driver = data; struct _CamelFilterDriverPrivate *p = _PRIVATE (driver); - report_status(driver, FILTER_STATUS_PROGRESS, g_hash_table_size(p->folders) * 100 / p->closed, "Syncing folders"); + report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, g_hash_table_size(p->folders) * 100 / p->closed, "Syncing folders"); p->closed++; g_free (key); @@ -615,11 +615,11 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, Ca if (st.st_size > 0) pc = (int)(100.0 * ((double)camel_mime_parser_tell (mp) / (double)st.st_size)); - report_status (driver, FILTER_STATUS_START, pc, "Getting message %d (%d%% of file)", i, pc); + report_status (driver, CAMEL_FILTER_STATUS_START, pc, "Getting message %d (%d%% of file)", i, pc); msg = camel_mime_message_new (); if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mp) == -1) { - report_status (driver, FILTER_STATUS_END, 100, "Failed message %d", i); + report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Failed message %d", i); camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, "Cannot open message"); camel_object_unref (CAMEL_OBJECT (msg)); goto fail; @@ -628,11 +628,11 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, Ca camel_filter_driver_filter_message (driver, msg, NULL, source_url, ex); camel_object_unref (CAMEL_OBJECT (msg)); if (camel_exception_is_set (ex)) { - report_status (driver, FILTER_STATUS_END, 100, "Failed message %d", i); + report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Failed message %d", i); goto fail; } - report_status (driver, FILTER_STATUS_END, pc, "Finished message %d", i); + report_status (driver, CAMEL_FILTER_STATUS_END, pc, "Finished message %d", i); i++; /* skip over the FROM_END state */ @@ -640,11 +640,11 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, Ca } if (p->defaultfolder) { - report_status(driver, FILTER_STATUS_PROGRESS, 100, "Syncing folder"); + report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 100, "Syncing folder"); camel_folder_sync(p->defaultfolder, FALSE, ex); } - report_status (driver, FILTER_STATUS_END, 100, "Complete"); + report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Complete"); fail: g_free (source_url); @@ -678,11 +678,11 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folde for (i = 0; i < uids->len; i++) { int pc = (100 * i)/uids->len; - report_status (driver, FILTER_STATUS_START, pc, "Getting message %d of %d", i+1, uids->len); + report_status (driver, CAMEL_FILTER_STATUS_START, pc, "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, 100, "Failed at message %d of %d", i+1, uids->len); + report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Failed at message %d of %d", i+1, uids->len); break; } @@ -697,7 +697,7 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folde camel_folder_free_message_info (folder, info); if (camel_exception_is_set (ex)) { - report_status (driver, FILTER_STATUS_END, 100, "Failed at message %d of %d", i+1, uids->len); + report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Failed at message %d of %d", i+1, uids->len); break; } @@ -713,12 +713,12 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folde if (p->defaultfolder) { - report_status(driver, FILTER_STATUS_PROGRESS, 100, "Syncing folder"); + report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 100, "Syncing folder"); camel_folder_sync (p->defaultfolder, FALSE, ex); } if (i == uids->len) - report_status (driver, FILTER_STATUS_END, 100, "Complete"); + report_status (driver, CAMEL_FILTER_STATUS_END, 100, "Complete"); g_free (source_url); diff --git a/camel/camel-filter-driver.h b/camel/camel-filter-driver.h index a3ff6ab323..74803acfcd 100644 --- a/camel/camel-filter-driver.h +++ b/camel/camel-filter-driver.h @@ -48,11 +48,11 @@ struct _CamelFilterDriverClass { /* FIXME: this maybe should change... */ /* type of status for a status report */ enum camel_filter_status_t { - FILTER_STATUS_NONE, - FILTER_STATUS_START, /* start of new message processed */ - FILTER_STATUS_ACTION, /* an action performed */ - FILTER_STATUS_PROGRESS, /* (an) extra update(s), if its taking longer to process */ - FILTER_STATUS_END, /* end of message */ + CAMEL_FILTER_STATUS_NONE, + CAMEL_FILTER_STATUS_START, /* start of new message processed */ + CAMEL_FILTER_STATUS_ACTION, /* an action performed */ + CAMEL_FILTER_STATUS_PROGRESS, /* (an) extra update(s), if its taking longer to process */ + CAMEL_FILTER_STATUS_END, /* end of message */ }; typedef CamelFolder * (*CamelFilterGetFolderFunc) (CamelFilterDriver *, const char *uri, void *data, CamelException *ex); diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c index 2e84e73767..8f55452c98 100644 --- a/camel/camel-folder-thread.c +++ b/camel/camel-folder-thread.c @@ -538,7 +538,7 @@ camel_folder_thread_messages_new(CamelFolder *folder, GPtrArray *uids) /* remove any phantom nodes, this could possibly be put in group_root_set()? */ c = (CamelFolderThreadNode *)&head; - while (c->next) { + while (c && c->next) { CamelFolderThreadNode *scan, *newtop; child = c->next; |