aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/groupwise-features/share-folder-common.c3
-rw-r--r--plugins/itip-formatter/itip-formatter.c14
2 files changed, 12 insertions, 5 deletions
diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c
index adb373d6c6..10b0c4c622 100644
--- a/plugins/groupwise-features/share-folder-common.c
+++ b/plugins/groupwise-features/share-folder-common.c
@@ -273,9 +273,6 @@ users_dialog_response (GtkWidget *dialog, gint response, struct ShareInfo *ssi)
if (CAMEL_IS_VEE_STORE (store)) {
EFilterRule *rule;
- /* ensures vfolder is running */
- vfolder_load_storage (session);
-
rule = em_vfolder_rule_new (session);
e_filter_rule_set_name (rule, path);
vfolder_gui_add_rule (EM_VFOLDER_RULE (rule));
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 &&