aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-session-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-22 06:40:22 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-01-22 06:40:22 +0800
commit54ae8f0a7dfd79bed00757ef1f17f0ede085a7a3 (patch)
tree6ccb94678a99f3e6ab8b464a170893aa16df3726 /mail/e-mail-session-utils.c
parentb1565f53d797fe4dbbf7256eca060eb4d8ee9ee4 (diff)
downloadgsoc2013-evolution-54ae8f0a7dfd79bed00757ef1f17f0ede085a7a3.tar
gsoc2013-evolution-54ae8f0a7dfd79bed00757ef1f17f0ede085a7a3.tar.gz
gsoc2013-evolution-54ae8f0a7dfd79bed00757ef1f17f0ede085a7a3.tar.bz2
gsoc2013-evolution-54ae8f0a7dfd79bed00757ef1f17f0ede085a7a3.tar.lz
gsoc2013-evolution-54ae8f0a7dfd79bed00757ef1f17f0ede085a7a3.tar.xz
gsoc2013-evolution-54ae8f0a7dfd79bed00757ef1f17f0ede085a7a3.tar.zst
gsoc2013-evolution-54ae8f0a7dfd79bed00757ef1f17f0ede085a7a3.zip
Bug 640091 - Improve error handling during send post-processing
If a newly-composed message was successfully sent but an error occurred during post-processing (outgoing filters or appending to a Sent folder), close the composer window and show an alert in the main window.
Diffstat (limited to 'mail/e-mail-session-utils.c')
-rw-r--r--mail/e-mail-session-utils.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/mail/e-mail-session-utils.c b/mail/e-mail-session-utils.c
index f91bc73455..f77f1cac73 100644
--- a/mail/e-mail-session-utils.c
+++ b/mail/e-mail-session-utils.c
@@ -101,6 +101,19 @@ async_context_free (AsyncContext *context)
g_slice_free (AsyncContext, context);
}
+GQuark
+e_mail_error_quark (void)
+{
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0)) {
+ const gchar *string = "e-mail-error-quark";
+ quark = g_quark_from_static_string (string);
+ }
+
+ return quark;
+}
+
static void
mail_session_handle_draft_headers_thread (GSimpleAsyncResult *simple,
EMailSession *session,
@@ -590,7 +603,8 @@ exit:
/* Stuff the accumulated error messages in a GError. */
} else if (error_messages->len > 0) {
g_simple_async_result_set_error (
- simple, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+ simple, E_MAIL_ERROR,
+ E_MAIL_ERROR_POST_PROCESSING,
"%s", error_messages->str);
}