diff options
author | Milan Crha <mcrha@redhat.com> | 2013-03-14 21:58:21 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-03-14 21:58:21 +0800 |
commit | 7b9b20696b2fd5c1380f2834e91c646951157f38 (patch) | |
tree | dfe8d2a919286d857c8bad0fbe2a83073cefebd9 | |
parent | 43f9ea965702fcc07c9d18918002b83cd25dfb61 (diff) | |
download | gsoc2013-evolution-7b9b20696b2fd5c1380f2834e91c646951157f38.tar.gz gsoc2013-evolution-7b9b20696b2fd5c1380f2834e91c646951157f38.tar.zst gsoc2013-evolution-7b9b20696b2fd5c1380f2834e91c646951157f38.zip |
Bug #415371 - Create Incoming filter for messages with Received header
-rw-r--r-- | mail/e-mail-reader-utils.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index 619289be6c..dcb3383093 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -1733,6 +1733,11 @@ mail_reader_create_filter_cb (CamelFolder *folder, backend = e_mail_reader_get_backend (context->reader); session = e_mail_backend_get_session (backend); + /* Switch to Incoming filter in case the message contains a Received header */ + if (g_str_equal (context->filter_source, E_FILTER_SOURCE_OUTGOING) && + camel_medium_get_header (CAMEL_MEDIUM (message), "received")) + context->filter_source = E_FILTER_SOURCE_INCOMING; + filter_gui_add_from_message ( session, message, context->filter_source, @@ -1767,9 +1772,8 @@ e_mail_reader_create_filter_from_selected (EMailReader *reader, folder = e_mail_reader_get_folder (reader); g_return_if_fail (CAMEL_IS_FOLDER (folder)); - if (em_utils_folder_is_sent (registry, folder)) - filter_source = E_FILTER_SOURCE_OUTGOING; - else if (em_utils_folder_is_outbox (registry, folder)) + if (em_utils_folder_is_sent (registry, folder) || + em_utils_folder_is_outbox (registry, folder)) filter_source = E_FILTER_SOURCE_OUTGOING; else filter_source = E_FILTER_SOURCE_INCOMING; |