From 03315463529dd850639984f79b014c9486f2230a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 5 May 2011 14:06:14 -0400 Subject: 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 file changed, 3 insertions(+), 8 deletions(-) (limited to 'mail') diff --git a/mail/em-utils.c b/mail/em-utils.c index 1cb1d62492..7efa1df32c 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); } -- cgit