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
This commit is contained in:
Not Zed
2001-01-23 02:22:38 +00:00
committed by Michael Zucci
parent bbda4d56c3
commit dcf4c87893
2 changed files with 11 additions and 2 deletions

View File

@ -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):

View File

@ -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);