[evolution] Simplify em_folder_tree_model_set_folder_info().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Simplify em_folder_tree_model_set_folder_info().
- Date: Thu, 5 May 2011 19:21:26 +0000 (UTC)
commit 4978b0bf37a65a50598b2af1ac2c5fb6cc14db5a
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu May 5 14:15:56 2011 -0400
Simplify em_folder_tree_model_set_folder_info().
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-folder-tree-model.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index d2edb52..c9a020e 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -726,19 +726,17 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model,
if (si->account && (flags & CAMEL_FOLDER_TYPE_MASK) == 0) {
if (!is_drafts && si->account->drafts_folder_uri) {
- gchar *curi = em_uri_to_camel (si->account->drafts_folder_uri);
is_drafts = e_mail_folder_uri_equal (
- CAMEL_SESSION (session), fi->uri, curi);
- g_free (curi);
+ CAMEL_SESSION (session), fi->uri,
+ si->account->drafts_folder_uri);
}
if (si->account->sent_folder_uri) {
- gchar *curi = em_uri_to_camel (si->account->sent_folder_uri);
if (e_mail_folder_uri_equal (
- CAMEL_SESSION (session), fi->uri, curi)) {
+ CAMEL_SESSION (session), fi->uri,
+ si->account->sent_folder_uri)) {
add_flags = CAMEL_FOLDER_TYPE_SENT;
}
- g_free (curi);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]