From 770f4e8548ed650d11f1a6498ed8eaefa20930db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Dapena=20Paz?= Date: Thu, 17 Dec 2009 16:22:10 +0100 Subject: [PATCH] Autoretrieve calendar parts in bodystructure --- src/modest-tny-account-store.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 1499a75..b560a8e 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -883,10 +883,11 @@ volume_path_is_mounted (const gchar* path) static void _bodies_filter (TnyMsg *msg, TnyList *list) { - TnyMimePart *html_part, *text_part; + TnyMimePart *html_part, *text_part, *calendar_part; html_part = modest_tny_msg_find_body_part (msg, TRUE); text_part = modest_tny_msg_find_body_part (msg, FALSE); + calendar_part = modest_tny_msg_find_calendar (msg); if (text_part && TNY_IS_MIME_PART (text_part) && html_part == text_part) { g_object_unref (text_part); @@ -902,6 +903,11 @@ static void _bodies_filter (TnyMsg *msg, TnyList *list) tny_list_prepend (list, G_OBJECT (text_part)); g_object_unref (text_part); } + + if (calendar_part && TNY_IS_MIME_PART (calendar_part)) { + tny_list_prepend (list, G_OBJECT (calendar_part)); + g_object_unref (calendar_part); + } } -- 1.7.9.5