[evolution/wip/gsettings] Simplify em_utils_folder_is_drafts().
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/gsettings] Simplify em_utils_folder_is_drafts().
- Date: Wed, 29 Jun 2011 17:35:06 +0000 (UTC)
commit a7b7c8e963e7eba7ba7d1d804652a3b24c401572
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]