diff options
author | Not Zed <NotZed@Ximian.com> | 2001-01-23 10:22:38 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-01-23 10:22:38 +0800 |
commit | dcf4c87893feb08d98120ebb3dbbb9bfedb0d268 (patch) | |
tree | bb058c51ddad5bf636f7bcd0c777b93ccd60fd1a /camel | |
parent | bbda4d56c31cd0b21edd5c198ac6da6bea2988ad (diff) | |
download | gsoc2013-evolution-dcf4c87893feb08d98120ebb3dbbb9bfedb0d268.tar.gz gsoc2013-evolution-dcf4c87893feb08d98120ebb3dbbb9bfedb0d268.tar.zst gsoc2013-evolution-dcf4c87893feb08d98120ebb3dbbb9bfedb0d268.zip |
avoid /0 by updating after we've done the sync. (close_folders): Setup the
2001-01-23 Not Zed <NotZed@Ximian.com>
* camel-filter-driver.c (close_folder): avoid /0 by updating after
we've done the sync.
(close_folders): Setup the first progress report to start it off.
svn path=/trunk/; revision=7734
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 034ac2d011..3fedcec679 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-01-23 Not Zed <NotZed@Ximian.com> + + * camel-filter-driver.c (close_folder): avoid /0 by updating after + we've done the sync. + (close_folders): Setup the first progress report to start it off. + 2001-01-22 Christopher James Lahey <clahey@helixcode.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index 2d74d7098f..69229321fe 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -493,13 +493,14 @@ close_folder (void *key, void *value, void *data) CamelFilterDriver *driver = data; struct _CamelFilterDriverPrivate *p = _PRIVATE (driver); - report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, g_hash_table_size(p->folders) * 100 / p->closed, "Syncing folders"); p->closed++; g_free (key); camel_folder_sync (folder, FALSE, p->ex); camel_folder_thaw (folder); camel_object_unref (CAMEL_OBJECT (folder)); + + report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, g_hash_table_size(p->folders)* 100 / p->closed, "Syncing folders"); } /* flush/close all folders */ @@ -507,7 +508,9 @@ static int close_folders (CamelFilterDriver *driver) { struct _CamelFilterDriverPrivate *p = _PRIVATE (driver); - + + report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 0, "Syncing folders"); + p->closed = 0; g_hash_table_foreach (p->folders, close_folder, driver); g_hash_table_destroy (p->folders); |