diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-11-13 05:59:35 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-11-13 05:59:35 +0800 |
commit | badea0eb12ac006611f4e3ff540ce154e8f737b6 (patch) | |
tree | 1805750a2721861ee43ffe34f10a69c6f69858aa | |
parent | f95b414ea30553ac44b3c74d3f1d1cd5adebc32d (diff) | |
download | gsoc2013-evolution-badea0eb12ac006611f4e3ff540ce154e8f737b6.tar.gz gsoc2013-evolution-badea0eb12ac006611f4e3ff540ce154e8f737b6.tar.zst gsoc2013-evolution-badea0eb12ac006611f4e3ff540ce154e8f737b6.zip |
If there is a default folder and the message hasn't been deleted then...
2000-11-12 Jeffrey Stedfast <fejj@helixcode.com>
* filter-driver.c (filter_driver_filter_message): If there is a
default folder and the message hasn't been deleted then... should
be: If there is a default folder and the message hasn't been
copied to another folder...
(filter_driver_filter_message): Make it so that the FILTER_LOG_END
is only called if filtered were applied to the message so we don't
get huge gaps of whitespace in the log file.
svn path=/trunk/; revision=6554
-rw-r--r-- | filter/ChangeLog | 3 | ||||
-rw-r--r-- | filter/filter-driver.c | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index c7778c5ca6..19609707bb 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -4,6 +4,9 @@ default folder and the message hasn't been deleted then... should be: If there is a default folder and the message hasn't been copied to another folder... + (filter_driver_filter_message): Make it so that the FILTER_LOG_END + is only called if filtered were applied to the message so we don't + get huge gaps of whitespace in the log file. 2000-11-10 Christopher James Lahey <clahey@helixcode.com> diff --git a/filter/filter-driver.c b/filter/filter-driver.c index 666afa0b8e..48e95f9877 100644 --- a/filter/filter-driver.c +++ b/filter/filter-driver.c @@ -723,7 +723,8 @@ filter_driver_filter_message (FilterDriver *driver, CamelMimeMessage *message, C ESExpResult *r; GString *fsearch, *faction; FilterFilter *rule; - int freeinfo = FALSE; + gboolean freeinfo = FALSE; + gboolean filtered = FALSE; if (info == NULL) { struct _header_raw *h = CAMEL_MIME_PART (message)->headers; @@ -766,6 +767,7 @@ filter_driver_filter_message (FilterDriver *driver, CamelMimeMessage *message, C mail_tool_camel_lock_down (); if (matched) { + filtered = TRUE; filter_driver_log (driver, FILTER_LOG_START, FILTER_RULE (rule)->name); #ifndef NO_WARNINGS #warning "Must check expression parsed and executed properly?" @@ -785,6 +787,7 @@ filter_driver_filter_message (FilterDriver *driver, CamelMimeMessage *message, C if (p->defaultfolder && !p->copied) { /* copy it to the default inbox */ + filtered = TRUE; filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to default folder"); mail_tool_camel_lock_up (); camel_folder_append_message (p->defaultfolder, p->message, p->info, p->ex); @@ -793,7 +796,7 @@ filter_driver_filter_message (FilterDriver *driver, CamelMimeMessage *message, C /* *Now* we can set the DELETED flag... */ if (p->deleted) - info->flags = info->flags | CAMEL_MESSAGE_DELETED; + info->flags = info->flags | CAMEL_MESSAGE_DELETED; if (freeinfo) { camel_flag_list_free (&info->user_flags); @@ -805,5 +808,6 @@ filter_driver_filter_message (FilterDriver *driver, CamelMimeMessage *message, C g_free (info); } - filter_driver_log (driver, FILTER_LOG_END, NULL); + if (filtered) + filter_driver_log (driver, FILTER_LOG_END, NULL); } |