From 8d26722fa64a6c9861335ac0d3ef904b6bdfdeb0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 27 Feb 2012 12:07:37 +0100 Subject: Hides errors on message load --- mail/e-mail-reader.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'mail') diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index b471e981cb..132ee43259 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -2625,7 +2625,7 @@ mail_reader_message_loaded_cb (CamelFolder *folder, /* If the user picked a different message in the time it took * to fetch this message, then don't bother rendering it. */ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { - g_error_free (error); + g_clear_error (&error); goto exit; } @@ -2644,6 +2644,20 @@ mail_reader_message_loaded_cb (CamelFolder *folder, exit: priv->restoring_message_selection = FALSE; + if (error) { + EPreviewPane *preview_pane; + EWebView *web_view; + + preview_pane = e_mail_reader_get_preview_pane (reader); + web_view = e_preview_pane_get_web_view (preview_pane); + + e_alert_submit ( + E_ALERT_SINK (web_view), + "mail:no-retrieve-message", + error->message, NULL); + } + + g_clear_error (&error); mail_reader_closure_free (closure); -- cgit v1.2.3