aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-12 00:15:46 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-12 00:15:46 +0800
commitf5b8a56cc15dad01c1ef50475dab571b1a29eda4 (patch)
tree4aeef737e7afd2b902bc2db1bef313347d622a15 /mail/mail-ops.c
parent64c6a63cf22abea49895554cb7a058adc30cd0fc (diff)
downloadgsoc2013-evolution-f5b8a56cc15dad01c1ef50475dab571b1a29eda4.tar.gz
gsoc2013-evolution-f5b8a56cc15dad01c1ef50475dab571b1a29eda4.tar.zst
gsoc2013-evolution-f5b8a56cc15dad01c1ef50475dab571b1a29eda4.zip
Freeze/thaw around multi-message folder operations (flag, move)
svn path=/trunk/; revision=4739
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 851ba8e816..06d49d42c9 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -518,6 +518,9 @@ do_refile_messages (gpointer in_data, gpointer op_data, CamelException * ex)
return;
mail_tool_camel_lock_up ();
+ camel_folder_freeze (input->source);
+ camel_folder_freeze (dest);
+
for (i = 0; i < input->uids->len; i++) {
camel_folder_move_message_to (input->source,
input->uids->pdata[i], dest,
@@ -527,6 +530,8 @@ do_refile_messages (gpointer in_data, gpointer op_data, CamelException * ex)
break;
}
+ camel_folder_thaw (input->source);
+ camel_folder_thaw (dest);
camel_object_unref (CAMEL_OBJECT (dest));
mail_tool_camel_lock_down ();
}
@@ -625,6 +630,10 @@ do_flag_messages (gpointer in_data, gpointer op_data, CamelException * ex)
flag_messages_input_t *input = (flag_messages_input_t *) in_data;
gint i;
+ mail_tool_camel_lock_up ();
+ camel_folder_freeze (input->source);
+ mail_tool_camel_lock_down ();
+
for (i = 0; i < input->uids->len; i++) {
if (input->invert) {
const CamelMessageInfo *info;
@@ -641,6 +650,10 @@ do_flag_messages (gpointer in_data, gpointer op_data, CamelException * ex)
g_free (input->uids->pdata[i]);
}
+
+ mail_tool_camel_lock_up ();
+ camel_folder_thaw (input->source);
+ mail_tool_camel_lock_down ();
}
static void