aboutsummaryrefslogtreecommitdiffstats
path: root/modules/itip-formatter
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-16 03:05:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-18 00:08:46 +0800
commit060bb076625dba3aad86485014d49a348cf13671 (patch)
treedd32838d9ead76aa5c9794aaa7881c84bf153e96 /modules/itip-formatter
parentc36aa6b7498ac73a77624533516b010f5701f08b (diff)
downloadgsoc2013-evolution-060bb076625dba3aad86485014d49a348cf13671.tar
gsoc2013-evolution-060bb076625dba3aad86485014d49a348cf13671.tar.gz
gsoc2013-evolution-060bb076625dba3aad86485014d49a348cf13671.tar.bz2
gsoc2013-evolution-060bb076625dba3aad86485014d49a348cf13671.tar.lz
gsoc2013-evolution-060bb076625dba3aad86485014d49a348cf13671.tar.xz
gsoc2013-evolution-060bb076625dba3aad86485014d49a348cf13671.tar.zst
gsoc2013-evolution-060bb076625dba3aad86485014d49a348cf13671.zip
mail_folder_cache_get_folder_info_flags: Change parameters.
Take a CamelStore and folder name instead of a CamelFolder. CamelStore and folder name can easily be obtained from either a folder URI or a CamelFolder instance, and the function is more efficient with separate parameters.
Diffstat (limited to 'modules/itip-formatter')
-rw-r--r--modules/itip-formatter/itip-view.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index 3f77f407c9..32ac52dc44 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -5776,10 +5776,13 @@ in_proper_folder (CamelFolder *folder)
EMailSession *session;
MailFolderCache *folder_cache;
ESourceRegistry *registry;
+ CamelStore *store;
+ const gchar *folder_name;
gboolean res = TRUE;
CamelFolderInfoFlags flags = 0;
+ gboolean have_flags;
- if (!folder)
+ if (folder == NULL)
return FALSE;
shell = e_shell_get_default ();
@@ -5789,7 +5792,13 @@ in_proper_folder (CamelFolder *folder)
session = e_mail_backend_get_session (backend);
folder_cache = e_mail_session_get_folder_cache (session);
- if (mail_folder_cache_get_folder_info_flags (folder_cache, folder, &flags)) {
+ store = camel_folder_get_parent_store (folder);
+ folder_name = camel_folder_get_full_name (folder);
+
+ have_flags = mail_folder_cache_get_folder_info_flags (
+ folder_cache, store, folder_name, &flags);
+
+ if (have_flags) {
/* it should be neither trash nor junk folder, */
res = ((flags & CAMEL_FOLDER_TYPE_MASK) != CAMEL_FOLDER_TYPE_TRASH &&
(flags & CAMEL_FOLDER_TYPE_MASK) != CAMEL_FOLDER_TYPE_JUNK &&