diff options
author | Milan Crha <mcrha@redhat.com> | 2012-09-13 14:37:38 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-09-13 14:41:27 +0800 |
commit | 5ce8bf667d7151dee9a93c8421730c28877be9a5 (patch) | |
tree | ae5b5bf6abc47048ce88246933ec8f6b9a7cb7ef /em-format/e-mail-inline-filter.c | |
parent | 656ae89d53cf4c2553d4997d17f5c89888c493b1 (diff) | |
download | gsoc2013-evolution-5ce8bf667d7151dee9a93c8421730c28877be9a5.tar gsoc2013-evolution-5ce8bf667d7151dee9a93c8421730c28877be9a5.tar.gz gsoc2013-evolution-5ce8bf667d7151dee9a93c8421730c28877be9a5.tar.bz2 gsoc2013-evolution-5ce8bf667d7151dee9a93c8421730c28877be9a5.tar.lz gsoc2013-evolution-5ce8bf667d7151dee9a93c8421730c28877be9a5.tar.xz gsoc2013-evolution-5ce8bf667d7151dee9a93c8421730c28877be9a5.tar.zst gsoc2013-evolution-5ce8bf667d7151dee9a93c8421730c28877be9a5.zip |
[text/plain parser] Use original part when nothing found inline
This way the view corresponds to the original part properties,
not those stripped by the inline filter. Also initialize
EMailInlineFilter::filename on creation of the structure, thus
the value is actually used on the subparts, if needed.
Diffstat (limited to 'em-format/e-mail-inline-filter.c')
-rw-r--r-- | em-format/e-mail-inline-filter.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/em-format/e-mail-inline-filter.c b/em-format/e-mail-inline-filter.c index 0c2e6b835e..242ac5959a 100644 --- a/em-format/e-mail-inline-filter.c +++ b/em-format/e-mail-inline-filter.c @@ -415,6 +415,7 @@ e_mail_inline_filter_init (EMailInlineFilter *emif) * raw data being processed. * @base_type: The base content-type of the raw data, should always be * text/plain. + * @filename: Filename of the part, or NULL * * Create a filter which will scan a (text) stream for * embedded parts. You can then retrieve the contents @@ -424,7 +425,8 @@ e_mail_inline_filter_init (EMailInlineFilter *emif) **/ EMailInlineFilter * e_mail_inline_filter_new (CamelTransferEncoding base_encoding, - CamelContentType *base_type) + CamelContentType *base_type, + const gchar *filename) { EMailInlineFilter *emif; @@ -435,6 +437,9 @@ e_mail_inline_filter_new (CamelTransferEncoding base_encoding, camel_content_type_ref (emif->base_type); } + if (filename && *filename) + emif->filename = g_strdup (filename); + return emif; } |