[evolution] Simplify em_utils_folder_is_templates().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Simplify em_utils_folder_is_templates().
- Date: Thu, 5 May 2011 19:21:10 +0000 (UTC)
commit 6077ee74b623ee5fa1c5b79c4e74f79b48a91b9e
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu May 5 14:02:48 2011 -0400
Simplify em_utils_folder_is_templates().
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 c20649c..1cb1d62 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1036,15 +1036,10 @@ em_utils_folder_is_templates (CamelFolder *folder)
/* XXX EIterator misuses const. */
account = (EAccount *) e_iterator_get (iterator);
- if (account->templates_folder_uri) {
- gchar *templates_uri;
-
- templates_uri = em_uri_to_camel (
- account->templates_folder_uri);
+ if (account->templates_folder_uri != NULL)
is_templates = e_mail_folder_uri_equal (
- session, templates_uri, folder_uri);
- g_free (templates_uri);
- }
+ session, folder_uri,
+ account->templates_folder_uri);
e_iterator_next (iterator);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]