[evolution/f18] Add patch for Red Hat bug #475117 and bug #903469
Milan Crha
mcrha at fedoraproject.org
Thu Jan 24 12:21:40 UTC 2013
commit d3eb626ea0195ffb697e4945da93423276e1348f
Author: Milan Crha <mcrha at redhat.com>
Date: Thu Jan 24 13:21:11 2013 +0100
Add patch for Red Hat bug #475117 and bug #903469
evolution-3.6.3-rhbug475117.patch | 150 +++++++++++++++++++++++++++++++++++++
evolution-3.6.3-rhbug903469.patch | 46 +++++++++++
evolution.spec | 11 +++-
3 files changed, 206 insertions(+), 1 deletions(-)
---
diff --git a/evolution-3.6.3-rhbug475117.patch b/evolution-3.6.3-rhbug475117.patch
new file mode 100644
index 0000000..7baa84c
--- /dev/null
+++ b/evolution-3.6.3-rhbug475117.patch
@@ -0,0 +1,150 @@
+commit 9f5d682172643701e51452c4803db904cd6dbeac
+Author: Milan Crha <mcrha at redhat.com>
+Date: Wed Jan 23 20:06:47 2013 +0100
+
+ Bug #680537 - Reply to individual message in digest generates empty body
+
+diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c
+index 8bc2aad..1623cca 100644
+--- a/modules/mail/e-mail-attachment-handler.c
++++ b/modules/mail/e-mail-attachment-handler.c
+@@ -60,40 +60,87 @@ static GtkTargetEntry target_table[] = {
+ { (gchar *) "x-uid-list", 0, 0 }
+ };
+
+-static void
+-mail_attachment_handler_forward (GtkAction *action,
+- EAttachmentHandler *handler)
++static CamelMimeMessage *
++mail_attachment_handler_get_selected_message (EAttachmentHandler *handler)
+ {
+- EMailAttachmentHandlerPrivate *priv;
+- EShellSettings *shell_settings;
+ EAttachment *attachment;
+ EAttachmentView *view;
+ CamelMimePart *mime_part;
+ CamelDataWrapper *wrapper;
+- EMailForwardStyle style;
+- const gchar *property_name;
++ CamelMimeMessage *message = NULL;
++ CamelContentType *content_type;
+ GList *selected;
+
+ view = e_attachment_handler_get_view (handler);
+- priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
+
+ selected = e_attachment_view_get_selected_attachments (view);
+- g_return_if_fail (g_list_length (selected) == 1);
++ g_return_val_if_fail (g_list_length (selected) == 1, NULL);
+
+ attachment = E_ATTACHMENT (selected->data);
+ mime_part = e_attachment_get_mime_part (attachment);
+ wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
+
++ content_type = camel_data_wrapper_get_mime_type_field (wrapper);
++ if (content_type && camel_content_type_is (content_type, "message", "rfc822")) {
++ CamelDataWrapper *inner;
++ CamelContentType *inner_content_type;
++
++ inner = camel_medium_get_content (CAMEL_MEDIUM (wrapper));
++ inner_content_type = camel_data_wrapper_get_mime_type_field (inner);
++ if (!camel_content_type_is (inner_content_type, content_type->type, content_type->subtype)) {
++ CamelStream *mem;
++
++ /* Create a message copy in case the inner content-type doesn't match
++ the mime_part's content type, which can happen for multipart/digest,
++ where it confuses the formatter on reply, which skips all rfc822 subparts.
++ */
++ mem = camel_stream_mem_new ();
++ camel_data_wrapper_write_to_stream_sync (CAMEL_DATA_WRAPPER (wrapper), mem, NULL, NULL);
++
++ g_seekable_seek (G_SEEKABLE (mem), 0, G_SEEK_SET, NULL, NULL);
++ message = camel_mime_message_new ();
++ if (!camel_data_wrapper_construct_from_stream_sync (CAMEL_DATA_WRAPPER (message), mem, NULL, NULL)) {
++ g_object_unref (message);
++ message = NULL;
++ }
++
++ g_object_unref (mem);
++ }
++ }
++
++ if (!message)
++ message = g_object_ref (wrapper);
++
++ g_list_foreach (selected, (GFunc) g_object_unref, NULL);
++ g_list_free (selected);
++
++ return message;
++}
++
++static void
++mail_attachment_handler_forward (GtkAction *action,
++ EAttachmentHandler *handler)
++{
++ EMailAttachmentHandlerPrivate *priv;
++ EShellSettings *shell_settings;
++ EMailForwardStyle style;
++ CamelMimeMessage *message;
++ const gchar *property_name;
++
++ priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
++
++ message = mail_attachment_handler_get_selected_message (handler);
++ g_return_if_fail (message != NULL);
++
+ property_name = "mail-forward-style";
+ shell_settings = e_shell_get_shell_settings (priv->shell);
+ style = e_shell_settings_get_int (shell_settings, property_name);
+
+ em_utils_forward_message (
+ priv->shell, CAMEL_SESSION (priv->session),
+- CAMEL_MIME_MESSAGE (wrapper), style, NULL, NULL);
++ message, style, NULL, NULL);
+
+- g_list_foreach (selected, (GFunc) g_object_unref, NULL);
+- g_list_free (selected);
++ g_object_unref (message);
+ }
+
+ static void
+@@ -102,34 +149,24 @@ mail_attachment_handler_reply (EAttachmentHandler *handler,
+ {
+ EMailAttachmentHandlerPrivate *priv;
+ EShellSettings *shell_settings;
+- EAttachment *attachment;
+- EAttachmentView *view;
+- CamelMimePart *mime_part;
+- CamelDataWrapper *wrapper;
+ EMailReplyStyle style;
++ CamelMimeMessage *message;
+ const gchar *property_name;
+- GList *selected;
+
+- view = e_attachment_handler_get_view (handler);
+ priv = E_MAIL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
+
+- selected = e_attachment_view_get_selected_attachments (view);
+- g_return_if_fail (g_list_length (selected) == 1);
+-
+- attachment = E_ATTACHMENT (selected->data);
+- mime_part = e_attachment_get_mime_part (attachment);
+- wrapper = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
++ message = mail_attachment_handler_get_selected_message (handler);
++ g_return_if_fail (message != NULL);
+
+ property_name = "mail-reply-style";
+ shell_settings = e_shell_get_shell_settings (priv->shell);
+ style = e_shell_settings_get_int (shell_settings, property_name);
+
+ em_utils_reply_to_message (
+- priv->shell, CAMEL_MIME_MESSAGE (wrapper),
++ priv->shell, message,
+ NULL, NULL, reply_type, style, NULL, NULL);
+
+- g_list_foreach (selected, (GFunc) g_object_unref, NULL);
+- g_list_free (selected);
++ g_object_unref (message);
+ }
+
+ static void
diff --git a/evolution-3.6.3-rhbug903469.patch b/evolution-3.6.3-rhbug903469.patch
new file mode 100644
index 0000000..6c86e2d
--- /dev/null
+++ b/evolution-3.6.3-rhbug903469.patch
@@ -0,0 +1,46 @@
+diff --git a/em-format/e-mail-formatter.h b/em-format/e-mail-formatter.h
+index 9b4e84d..befa473 100644
+--- a/em-format/e-mail-formatter.h
++++ b/em-format/e-mail-formatter.h
+@@ -50,6 +50,7 @@ typedef enum {
+ E_MAIL_FORMATTER_MODE_NORMAL = 0,
+ E_MAIL_FORMATTER_MODE_SOURCE,
+ E_MAIL_FORMATTER_MODE_RAW,
++ E_MAIL_FORMATTER_MODE_CID,
+ E_MAIL_FORMATTER_MODE_PRINTING,
+ E_MAIL_FORMATTER_MODE_ALL_HEADERS
+ } EMailFormatterMode;
+diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
+index 9bb3238..9da76863 100644
+--- a/mail/e-mail-display.c
++++ b/mail/e-mail-display.c
+@@ -354,7 +354,7 @@ mail_display_resource_requested (WebKitWebView *web_view,
+ new_uri = e_mail_part_build_uri (
+ part_list->folder, part_list->message_uid,
+ "part_id", G_TYPE_STRING, uri,
+- "mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_RAW, NULL);
++ "mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_CID, NULL);
+
+ webkit_network_request_set_uri (request, new_uri);
+
+diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c
+index 2794cee..b27b009 100644
+--- a/mail/e-mail-request.c
++++ b/mail/e-mail-request.c
+@@ -142,15 +142,7 @@ handle_mail_request (GSimpleAsyncResult *res,
+ }
+
+ if (part) {
+- CamelContentType *content_type;
+-
+- content_type = camel_mime_part_get_content_type (part->part);
+-
+- if (context.mode == E_MAIL_FORMATTER_MODE_RAW && content_type &&
+- camel_content_type_is (content_type, "text", "*") &&
+- !camel_content_type_is (content_type, "text", "plain") &&
+- !camel_content_type_is (content_type, "text", "html") &&
+- !camel_content_type_is (content_type, "text", "calendar")) {
++ if (context.mode == E_MAIL_FORMATTER_MODE_CID) {
+ CamelDataWrapper *dw;
+ CamelStream *raw_content;
+ GByteArray *ba;
diff --git a/evolution.spec b/evolution.spec
index 045f1db..5cd0516 100644
--- a/evolution.spec
+++ b/evolution.spec
@@ -29,7 +29,7 @@
Name: evolution
Version: 3.6.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Applications/Productivity
Summary: Mail and calendar client for GNOME
License: GPLv2+ and GFDL
@@ -49,6 +49,9 @@ Patch01: evolution-1.4.4-ldap-x86_64-hack.patch
# RH bug #589555
Patch02: evolution-2.30.1-help-contents.patch
+Patch03: evolution-3.6.3-rhbug475117.patch
+Patch04 :evolution-3.6.3-rhbug903469.patch
+
## Dependencies ###
Requires: gnome-icon-theme >= %{gnome_icon_theme_version}
@@ -190,6 +193,8 @@ This package contains the plugin to import Microsoft Personal Storage Table
%setup -q -n evolution-%{version}
%patch01 -p1 -b .ldaphack
%patch02 -p1 -b .help-contents
+%patch03 -p1 -b .rhbug475117
+%patch04 -p1 -b .rhbug903469
mkdir -p krb5-fakeprefix/include
mkdir -p krb5-fakeprefix/lib
@@ -528,6 +533,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Thu Jan 24 2013 Milan Crha <mcrha at redhat.com> - 3.6.3-2
+- Add patch for Red Hat bug #475117 (Reply in multipart/digest)
+- Add patch for Red Hat bug #903469 (Formatting of text/* parts)
+
* Tue Jan 22 2013 Milan Crha <mcrha at redhat.com> - 3.6.3-1
- Update to 3.6.3
- Remove patch for Red Hat bug #875109 (fixed upstream)
More information about the scm-commits
mailing list