[evolution] Bug #573304 - Forward an email shouldn't strip signature
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Bug #573304 - Forward an email shouldn't strip signature
- Date: Thu, 5 Nov 2009 19:53:21 +0000 (UTC)
commit 4fd8fbc29a32a2d91b75599f24f49f66002ddb8f
Author: Milan Crha <mcrha redhat com>
Date: Thu Nov 5 20:52:15 2009 +0100
Bug #573304 - Forward an email shouldn't strip signature
composer/e-msg-composer.c | 10 ++++++----
em-format/em-format-quote.c | 2 +-
em-format/em-format-quote.h | 1 +
mail/em-composer-utils.c | 2 +-
4 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index ffd81a0..9a28a68 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -144,7 +144,7 @@ emcu_part_to_html (CamelMimePart *part, gssize *len, EMFormat *source)
mem = (CamelStreamMem *) camel_stream_mem_new ();
camel_stream_mem_set_byte_array (mem, buf);
- emfq = em_format_quote_new(NULL, (CamelStream *)mem, 0);
+ emfq = em_format_quote_new (NULL, (CamelStream *)mem, EM_FORMAT_QUOTE_KEEP_SIG);
((EMFormat *) emfq)->composer = TRUE;
if (source) {
/* copy over things we can, other things are internal, perhaps need different api than 'clone' */
@@ -4166,14 +4166,16 @@ e_save_spell_languages (GList *spell_languages)
}
}
-void e_msg_composer_set_mail_sent (EMsgComposer *composer, gboolean mail_sent)
+void
+e_msg_composer_set_mail_sent (EMsgComposer *composer, gboolean mail_sent)
{
- g_return_val_if_fail (composer != NULL, FALSE);
+ g_return_if_fail (composer != NULL);
composer->priv->mail_sent = mail_sent;
}
-gboolean e_msg_composer_get_mail_sent (EMsgComposer *composer)
+gboolean
+e_msg_composer_get_mail_sent (EMsgComposer *composer)
{
g_return_val_if_fail (composer != NULL, FALSE);
diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c
index 05fefa0..1da4fbe 100644
--- a/em-format/em-format-quote.c
+++ b/em-format/em-format-quote.c
@@ -509,7 +509,7 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E
filtered_stream = camel_stream_filter_new_with_stream(stream);
- if (emfq->flags != 0) {
+ if ((emfq->flags & EM_FORMAT_QUOTE_KEEP_SIG) == 0) {
sig_strip = em_stripsig_filter_new ();
camel_stream_filter_add (filtered_stream, sig_strip);
camel_object_unref (sig_strip);
diff --git a/em-format/em-format-quote.h b/em-format/em-format-quote.h
index 5b010e1..afc3675 100644
--- a/em-format/em-format-quote.h
+++ b/em-format/em-format-quote.h
@@ -47,6 +47,7 @@
#define EM_FORMAT_QUOTE_CITE (1<<0)
#define EM_FORMAT_QUOTE_HEADERS (1<<1)
+#define EM_FORMAT_QUOTE_KEEP_SIG (1<<2) /* do not strip signature */
G_BEGIN_DECLS
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 60b795a..b4fcebf 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1155,7 +1155,7 @@ forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages,
if (messages->len == 0)
return;
- flags = EM_FORMAT_QUOTE_HEADERS;
+ flags = EM_FORMAT_QUOTE_HEADERS | EM_FORMAT_QUOTE_KEEP_SIG;
if (style == MAIL_CONFIG_FORWARD_QUOTED)
flags |= EM_FORMAT_QUOTE_CITE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]