diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-01-22 06:40:22 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:21 +0800 |
commit | 15c32eafdb8a79152113559bd8a5e8f9e72f142c (patch) | |
tree | d5dfd5f6643eb578db480a31347d32ada4b7a4e8 /mail/em-composer-utils.c | |
parent | 042c0c5732a6d6144e9359ddb55f7c9e65f60010 (diff) | |
download | gsoc2013-evolution-15c32eafdb8a79152113559bd8a5e8f9e72f142c.tar gsoc2013-evolution-15c32eafdb8a79152113559bd8a5e8f9e72f142c.tar.gz gsoc2013-evolution-15c32eafdb8a79152113559bd8a5e8f9e72f142c.tar.bz2 gsoc2013-evolution-15c32eafdb8a79152113559bd8a5e8f9e72f142c.tar.lz gsoc2013-evolution-15c32eafdb8a79152113559bd8a5e8f9e72f142c.tar.xz gsoc2013-evolution-15c32eafdb8a79152113559bd8a5e8f9e72f142c.tar.zst gsoc2013-evolution-15c32eafdb8a79152113559bd8a5e8f9e72f142c.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/em-composer-utils.c')
-rw-r--r-- | mail/em-composer-utils.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 5dfa1ffa05..2668e2f1e0 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -489,7 +489,21 @@ composer_send_completed (EMailSession *session, goto exit; } - if (error != NULL) { + /* Post-processing errors are shown in the shell window. */ + if (g_error_matches (error, E_MAIL_ERROR, E_MAIL_ERROR_POST_PROCESSING)) { + EAlert *alert; + EShell *shell; + + shell = e_msg_composer_get_shell (context->composer); + + alert = e_alert_new ( + "mail-composer:send-post-processing-error", + error->message, NULL); + e_shell_submit_alert (shell, alert); + g_object_unref (alert); + + /* All other errors are shown in the composer window. */ + } else if (error != NULL) { gint response; /* Clear the activity bar before |