aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-17 21:40:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-19 00:32:37 +0800
commit35e55a8d6e3455efa92abd669680d191e3e4cbac (patch)
tree303d479aaaf12538d73f611f52db1157da64549b /plugins/itip-formatter
parentb674a37a381d0328a7273bafa62d80203c8cdf70 (diff)
downloadgsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar
gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar.gz
gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar.bz2
gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar.lz
gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar.xz
gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar.zst
gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.zip
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.
Diffstat (limited to 'plugins/itip-formatter')
-rw-r--r--plugins/itip-formatter/itip-formatter.c14
1 files changed, 12 insertions, 2 deletions
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 &&