From 115610493aaea63d2466795e25c4825b5e2a038e Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 23 Oct 2007 08:19:31 +0000 Subject: ** Fix for bug #271734 2007-10-23 Milan Crha ** Fix for bug #271734 * mail-mt.c: (do_op_status): Show description of operation, if available, instead of empty string and end activity properly, if operation ended before/during activity start. svn path=/trunk/; revision=34411 --- mail/ChangeLog | 8 ++++++++ mail/mail-mt.c | 13 +++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index e2f3258cca..a78f27f8f9 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2007-10-23 Milan Crha + + ** Fix for bug #271734 + + * mail-mt.c: (do_op_status): Show description of operation, if + available, instead of empty string and end activity properly, if + operation ended before/during activity start. + 2007-10-15 Matthew Barnes * em-folder-view.c: diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 1f9a9e4696..dcbfb2866b 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -988,6 +988,8 @@ static void do_op_status(struct _mail_msg *mm) MAIL_MT_UNLOCK (mail_msg_lock); if (msg->ops->describe_msg) what = msg->ops->describe_msg (msg, FALSE); + else if (m->what) + what = g_strdup (m->what); /* uncommenting because message is not very useful for a user, see bug 271734*/ else { what = g_strdup(""); @@ -997,15 +999,22 @@ static void do_op_status(struct _mail_msg *mm) data->activity_id = e_activity_handler_operation_started (activity_handler, "evolution-mail", progress_icon, what, TRUE); g_free (what); - MAIL_MT_LOCK (mail_msg_lock); if (data->activity_state == 3) { + int activity_id = data->activity_id; + MAIL_MT_UNLOCK (mail_msg_lock); - if (msg->cancel) + if (msg->cancel) { + camel_operation_mute (msg->cancel); camel_operation_unref (msg->cancel); + } camel_exception_clear (&msg->ex); g_free (msg->priv); g_free (msg); + + if (activity_id != 0) + mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) end_event_callback, + NULL, GINT_TO_POINTER (activity_id), NULL); } else { data->activity_state = 2; MAIL_MT_UNLOCK (mail_msg_lock); -- cgit