aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-disco-folder.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-disco-folder.c')
-rw-r--r--camel/camel-disco-folder.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/camel/camel-disco-folder.c b/camel/camel-disco-folder.c
index 965ceb0864..3d3d9212bd 100644
--- a/camel/camel-disco-folder.c
+++ b/camel/camel-disco-folder.c
@@ -275,21 +275,33 @@ disco_prepare_for_offline (CamelDiscoFolder *disco_folder,
GPtrArray *uids;
int i;
+ camel_operation_start(NULL, _("Preparing folder '%s' for offline"), folder->full_name);
+
if (expression)
uids = camel_folder_search_by_expression (folder, expression, ex);
else
uids = camel_folder_get_uids (folder);
- if (!uids)
+
+ if (!uids) {
+ camel_operation_end(NULL);
return;
+ }
+
for (i = 0; i < uids->len; i++) {
+ int pc = i * 100 / uids->len;
+
camel_disco_folder_cache_message (disco_folder, uids->pdata[i], ex);
+ camel_operation_progress(NULL, pc);
if (camel_exception_is_set (ex))
break;
}
+
if (expression)
camel_folder_search_free (folder, uids);
else
camel_folder_free_uids (folder, uids);
+
+ camel_operation_end(NULL);
}
/**