diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-07-16 03:05:08 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-07-18 00:08:46 +0800 |
commit | 060bb076625dba3aad86485014d49a348cf13671 (patch) | |
tree | dd32838d9ead76aa5c9794aaa7881c84bf153e96 /modules | |
parent | c36aa6b7498ac73a77624533516b010f5701f08b (diff) | |
download | gsoc2013-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')
-rw-r--r-- | modules/itip-formatter/itip-view.c | 13 |
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 && |