[evolution/webkit] Simplify em_utils_folder_is_drafts().



commit 60806e8b5d1f2c12685eaea8dc1265846944f7f5
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu May 5 14:06:14 2011 -0400

    Simplify em_utils_folder_is_drafts().
    
    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 |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 1cb1d62..7efa1df 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1091,15 +1091,10 @@ em_utils_folder_is_drafts (CamelFolder *folder)
 		/* XXX EIterator misuses const. */
 		account = (EAccount *) e_iterator_get (iterator);
 
-		if (account->drafts_folder_uri) {
-			gchar *drafts_uri;
-
-			drafts_uri = em_uri_to_camel (
-				account->drafts_folder_uri);
+		if (account->drafts_folder_uri != NULL)
 			is_drafts = e_mail_folder_uri_equal (
-				session, drafts_uri, folder_uri);
-			g_free (drafts_uri);
-		}
+				session, folder_uri,
+				account->drafts_folder_uri);
 
 		e_iterator_next (iterator);
 	}



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