[evolution] Simplify em_utils_folder_is_sent().



commit 3433cca045b1f59ec026d16790ff6c604edf3463
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu May 5 14:07:33 2011 -0400

    Simplify em_utils_folder_is_sent().
    
    e_mail_folder_uri_equal() uses e_mail_folder_uri_parse() to parse both
    URIs, so we can just hand it an 'email://' URI directly.

 mail/em-utils.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 7efa1df..14a8706 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1144,17 +1144,12 @@ em_utils_folder_is_sent (CamelFolder *folder)
 		EAccount *account;
 
 		/* XXX EIterator misuses const. */
-		account = (EAccount *)e_iterator_get (iterator);
-
-		if (account->sent_folder_uri) {
-			gchar *sent_uri;
+		account = (EAccount *) e_iterator_get (iterator);
 
-			sent_uri = em_uri_to_camel (
-				account->sent_folder_uri);
+		if (account->sent_folder_uri != NULL)
 			is_sent = e_mail_folder_uri_equal (
-				session, sent_uri, folder_uri);
-			g_free (sent_uri);
-		}
+				session, folder_uri,
+				account->sent_folder_uri);
 
 		e_iterator_next (iterator);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]