[evolution/gnome-3-4] Always notify about finished updated_folders() call
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-4] Always notify about finished updated_folders() call
- Date: Tue, 10 Jul 2012 08:58:03 +0000 (UTC)
commit dcab2806ed98d87362152bed46e343ca4b594483
Author: Milan Crha <mcrha redhat com>
Date: Tue Jul 10 10:57:06 2012 +0200
Always notify about finished updated_folders() call
libemail-engine/mail-folder-cache.c | 13 +++++--------
mail/mail-send-recv.c | 13 +++++++------
2 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index 32a4b99..956fd23 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -825,6 +825,7 @@ update_folders (CamelStore *store,
CamelFolderInfo *fi;
StoreInfo *si;
GError *error = NULL;
+ gboolean free_fi = TRUE;
fi = camel_store_get_folder_info_finish (store, result, &error);
@@ -852,14 +853,10 @@ update_folders (CamelStore *store,
si->first_update = FALSE;
}
- if (fi != NULL) {
- gboolean free_fi = TRUE;
-
- if (ud->done != NULL)
- free_fi = ud->done (ud->cache, store, fi, ud->data);
- if (free_fi)
- camel_store_free_folder_info (store, fi);
- }
+ if (ud->done != NULL)
+ free_fi = ud->done (ud->cache, store, fi, ud->data);
+ if (fi && free_fi)
+ camel_store_free_folder_info (store, fi);
if (ud->cancellable != NULL)
g_object_unref (ud->cancellable);
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index bee7e21..877c5cb 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -1040,17 +1040,18 @@ refresh_folders_exec (struct _refresh_folders_msg *m,
m->folders->pdata[i], 0,
cancellable, &local_error);
if (folder) {
- /* FIXME Not passing a GError here. */
- camel_folder_synchronize_sync (
- folder, FALSE, cancellable, NULL);
- camel_folder_refresh_info_sync (folder, cancellable, NULL);
+ if (camel_folder_synchronize_sync (folder, FALSE, cancellable, &local_error))
+ camel_folder_refresh_info_sync (folder, cancellable, &local_error);
g_object_unref (folder);
- } else if (local_error != NULL) {
+ }
+
+ if (local_error != NULL) {
g_warning ("Failed to refresh folders: %s", local_error->message);
g_clear_error (&local_error);
}
- if (g_cancellable_is_cancelled (m->info->cancellable))
+ if (g_cancellable_is_cancelled (m->info->cancellable) ||
+ g_cancellable_is_cancelled (cancellable))
break;
if (m->info->state != SEND_CANCELLED)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]