From 78cd0d0a73fd9941fe715438f9f498257d147090 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 1 Mar 2012 09:43:00 +0100 Subject: Bug #617557 - Can lost message after send failed --- composer/e-msg-composer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'composer') diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 9f32d8cabe..c9f41d599a 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -3518,6 +3518,10 @@ msg_composer_send_cb (EMsgComposer *composer, g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message)); + /* The callback can set editor 'changed' if anything failed. */ + editor = GTKHTML_EDITOR (composer); + gtkhtml_editor_set_changed (editor, FALSE); + g_signal_emit ( composer, signals[SEND], 0, message, context->activity); @@ -3525,10 +3529,6 @@ msg_composer_send_cb (EMsgComposer *composer, g_object_unref (message); async_context_free (context); - - /* XXX This should be elsewhere. */ - editor = GTKHTML_EDITOR (composer); - gtkhtml_editor_set_changed (editor, FALSE); } /** @@ -3610,6 +3610,10 @@ msg_composer_save_to_drafts_cb (EMsgComposer *composer, g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message)); + /* The callback can set editor 'changed' if anything failed. */ + editor = GTKHTML_EDITOR (composer); + gtkhtml_editor_set_changed (editor, FALSE); + g_signal_emit ( composer, signals[SAVE_TO_DRAFTS], 0, message, context->activity); @@ -3617,10 +3621,6 @@ msg_composer_save_to_drafts_cb (EMsgComposer *composer, g_object_unref (message); async_context_free (context); - - /* XXX This should be elsewhere. */ - editor = GTKHTML_EDITOR (composer); - gtkhtml_editor_set_changed (editor, FALSE); } /** -- cgit