From 35e55a8d6e3455efa92abd669680d191e3e4cbac Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 17 Oct 2010 09:40:36 -0400 Subject: Send errors to an EAlertSink instead of the task bar. This marks the end of unintrusive error dialogs, which were too unintrusive. We now show errors directly in the main window using the EAlert / EAlertSink framework. --- plugins/itip-formatter/itip-formatter.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'plugins/itip-formatter') diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 2c52241c54..d8ff9b95f6 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -2236,6 +2236,11 @@ check_is_instance (icalcomponent *icalcomp) static gboolean in_proper_folder (CamelFolder *folder) { + EShell *shell; + EShellBackend *shell_backend; + EMailBackend *backend; + EMailSession *session; + MailFolderCache *folder_cache; const gchar *folder_uri; gboolean res = TRUE; gint flags = 0; @@ -2243,10 +2248,15 @@ in_proper_folder (CamelFolder *folder) if (!folder) return FALSE; + shell = e_shell_get_default (); + shell_backend = e_shell_get_backend_by_name (shell, "mail"); + backend = E_MAIL_BACKEND (shell_backend); + session = e_mail_backend_get_session (backend); + folder_cache = e_mail_session_get_folder_cache (session); + folder_uri = camel_folder_get_uri (folder); - if (mail_folder_cache_get_folder_info_flags (mail_folder_cache_get_default (), - folder, &flags)) { + if (mail_folder_cache_get_folder_info_flags (folder_cache, folder, &flags)) { /* it should be neither trash nor junk folder, */ res = ((flags & CAMEL_FOLDER_TYPE_TRASH) != CAMEL_FOLDER_TYPE_TRASH && (flags & CAMEL_FOLDER_TYPE_JUNK) != CAMEL_FOLDER_TYPE_JUNK && -- cgit v1.2.3