diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-03 21:16:49 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:06 +0800 |
commit | bbf5ce3869dbdf1c277ee9d10b07e91fd775502b (patch) | |
tree | 58f626df0ec8780b130eb32eb309b209bd6a4b83 /mail/em-utils.c | |
parent | 7ddf79d7ce01de060de6046a01b7f53f6da78ecc (diff) | |
download | gsoc2013-evolution-bbf5ce3869dbdf1c277ee9d10b07e91fd775502b.tar.gz gsoc2013-evolution-bbf5ce3869dbdf1c277ee9d10b07e91fd775502b.tar.zst gsoc2013-evolution-bbf5ce3869dbdf1c277ee9d10b07e91fd775502b.zip |
Drop 'folder_uri' param from em_utils_folder_is_sent().
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r-- | mail/em-utils.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c index 86b6b812b1..5c8082d6e2 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1113,22 +1113,24 @@ em_utils_folder_is_drafts (CamelFolder *folder) /** * em_utils_folder_is_sent: - * @folder: folder - * @uri: uri for this folder, if known + * @folder: a #CamelFolder * - * Decides if @folder is a Sent folder + * Decides if @folder is a Sent folder. * * Returns %TRUE if this is a Sent folder or %FALSE otherwise. **/ gboolean -em_utils_folder_is_sent (CamelFolder *folder, const gchar *uri) +em_utils_folder_is_sent (CamelFolder *folder) { CamelFolder *local_sent_folder; CamelSession *session; CamelStore *store; EAccountList *account_list; EIterator *iterator; - gint is_sent = FALSE; + gchar *folder_uri; + gboolean is_sent = FALSE; + + g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE); local_sent_folder = e_mail_local_get_folder (E_MAIL_LOCAL_FOLDER_SENT); @@ -1136,8 +1138,7 @@ em_utils_folder_is_sent (CamelFolder *folder, const gchar *uri) if (folder == local_sent_folder) return TRUE; - if (folder == NULL || uri == NULL) - return FALSE; + folder_uri = e_mail_folder_uri_from_folder (folder); store = camel_folder_get_parent_store (folder); session = camel_service_get_session (CAMEL_SERVICE (store)); @@ -1157,7 +1158,7 @@ em_utils_folder_is_sent (CamelFolder *folder, const gchar *uri) sent_uri = em_uri_to_camel ( account->sent_folder_uri); is_sent = e_mail_folder_uri_equal ( - session, sent_uri, uri); + session, sent_uri, folder_uri); g_free (sent_uri); } @@ -1165,6 +1166,7 @@ em_utils_folder_is_sent (CamelFolder *folder, const gchar *uri) } g_object_unref (iterator); + g_free (folder_uri); return is_sent; } |