aboutsummaryrefslogtreecommitdiffstats
path: root/modules/itip-formatter/e-mail-formatter-itip.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-12-05 05:45:44 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-12-08 03:01:04 +0800
commit2f0d83cf74b94d5e6272c07179df6e6c7a929789 (patch)
treecf6b432d7992770ac8841f242cb487c2ac31a7fc /modules/itip-formatter/e-mail-formatter-itip.c
parent13f4544dafe211a748b064b86a8af4085d042b2b (diff)
downloadgsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar.gz
gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar.zst
gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.zip
EMailFormatterContext: Keep a reference to EMailPartList.
Replace the individual components of an EMailPartList with a reference on the EMailPartList itself in EMailFormatContext. Easier to manage.
Diffstat (limited to 'modules/itip-formatter/e-mail-formatter-itip.c')
-rw-r--r--modules/itip-formatter/e-mail-formatter-itip.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/modules/itip-formatter/e-mail-formatter-itip.c b/modules/itip-formatter/e-mail-formatter-itip.c
index ca6b2f64cd..15b7df42a6 100644
--- a/modules/itip-formatter/e-mail-formatter-itip.c
+++ b/modules/itip-formatter/e-mail-formatter-itip.c
@@ -90,25 +90,31 @@ emfe_itip_format (EMailFormatterExtension *extension,
itip_view_write (formatter, buffer);
} else {
+ CamelFolder *folder;
+ CamelMimeMessage *message;
+ const gchar *message_uid;
gchar *uri;
+ folder = context->part_list->folder;
+ message = context->part_list->message;
+ message_uid = context->part_list->message_uid;
+
/* mark message as containing calendar, thus it will show the
* icon in message list now on */
- if (context->message_uid && context->folder &&
+ if (message_uid != NULL && folder != NULL &&
!camel_folder_get_message_user_flag (
- context->folder, context->message_uid, "$has_cal")) {
+ folder, message_uid, "$has_cal")) {
camel_folder_set_message_user_flag (
- context->folder, context->message_uid,
- "$has_cal", TRUE);
+ folder, message_uid, "$has_cal", TRUE);
}
- itip_part->folder = g_object_ref (context->folder);
- itip_part->uid = g_strdup (context->message_uid);
- itip_part->msg = g_object_ref (context->message);
+ itip_part->folder = g_object_ref (folder);
+ itip_part->uid = g_strdup (message_uid);
+ itip_part->msg = g_object_ref (message);
uri = e_mail_part_build_uri (
- context->folder, context->message_uid,
+ folder, message_uid,
"part_id", G_TYPE_STRING, part->id,
"mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_RAW,
NULL);