From f5b8a56cc15dad01c1ef50475dab571b1a29eda4 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Fri, 11 Aug 2000 16:15:46 +0000 Subject: Freeze/thaw around multi-message folder operations (flag, move) svn path=/trunk/; revision=4739 --- mail/ChangeLog | 3 +++ mail/mail-ops.c | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/mail/ChangeLog b/mail/ChangeLog index 78fa34e912..61174a9550 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -38,6 +38,9 @@ 2000-08-11 Peter Williams + * mail-ops.c (do_refile_messages): Freeze the folders while moving. + (do_flag_messages): Same. + * mail-threads.c (get_password_clicked): Fix the case when the user /doesn't/ use escape to cancel the dialog :-/ (show_error_clicked): Same. 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 -- cgit