diff --git a/src/mail/mail.error.xml b/src/mail/mail.error.xml index 421bf1f587..50dd00c490 100644 --- a/src/mail/mail.error.xml +++ b/src/mail/mail.error.xml @@ -661,4 +661,9 @@ in the folder will be available in offline mode. <_primary>Cannot archive messages <_secondary>No Archive folder is configured. Please configure one for the account in order to be able to archive messages. + + + <_primary>Failed to generate message list + {0} + diff --git a/src/mail/message-list.c b/src/mail/message-list.c index fa384d2413..7f46260e8e 100644 --- a/src/mail/message-list.c +++ b/src/mail/message-list.c @@ -6728,9 +6728,18 @@ message_list_regen_done_cb (GObject *source_object, g_error_free (local_error); return; - /* FIXME This should be handed off to an EAlertSink. */ } else if (local_error != NULL) { - g_warning ("%s: %s", G_STRFUNC, local_error->message); + EAlertSink *alert_sink = e_activity_get_alert_sink (activity); + gboolean handled = FALSE; + + if (alert_sink) { + e_alert_submit (alert_sink, "mail:message-list-regen-failed", local_error->message, NULL); + handled = TRUE; + } + + if (!handled) + g_warning ("%s: %s", G_STRFUNC, local_error->message); + g_error_free (local_error); return; } diff --git a/src/shell/e-shell-taskbar.c b/src/shell/e-shell-taskbar.c index 44928ac353..fb98dd7fb4 100644 --- a/src/shell/e-shell-taskbar.c +++ b/src/shell/e-shell-taskbar.c @@ -181,6 +181,14 @@ shell_taskbar_activity_add (EShellTaskbar *shell_taskbar, shell_taskbar_weak_notify_cb, shell_taskbar); g_hash_table_insert (proxy_table, activity, proxy); + + /* Ensure there's an alert sink set, thus the errors are shown in the GUI */ + if (!e_activity_get_alert_sink (activity)) { + EShellView *shell_view = e_shell_taskbar_get_shell_view (shell_taskbar); + EShellContent *shell_content = e_shell_view_get_shell_content (shell_view); + + e_activity_set_alert_sink (activity, E_ALERT_SINK (shell_content)); + } } static gboolean