aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-filter-driver.c6
2 files changed, 11 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index d8fd6eaaeb..0cbe6a4fdb 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-filter-driver.c (do_flag): Only perform the operation on
+ the folder if the folder has summary capability, else just poke
+ the info directly. Fixes the "Filters don't work" bug.
+ (do_score): Same.
+ (do_colour): And here too.
+
2001-10-15 Jeffrey Stedfast <fejj@ximian.com>
* camel-stream-fs.c (stream_read): Save the errno before calling
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index d90798eb76..8d8822b72d 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -456,7 +456,7 @@ do_colour (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDr
d(fprintf (stderr, "setting colour tag\n"));
if (argc > 0 && argv[0]->type == ESEXP_RES_STRING) {
- if (p->source && p->uid)
+ if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
camel_folder_set_message_user_tag(p->source, p->uid, "colour", argv[0]->value.string);
else
camel_tag_set (&p->info->user_tags, "colour", argv[0]->value.string);
@@ -476,7 +476,7 @@ do_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDri
char *value;
value = g_strdup_printf ("%d", argv[0]->value.number);
- if (p->source && p->uid)
+ if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
camel_folder_set_message_user_tag(p->source, p->uid, "score", value);
else
camel_tag_set (&p->info->user_tags, "score", value);
@@ -494,7 +494,7 @@ do_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriv
d(fprintf (stderr, "setting flag\n"));
if (argc == 1 && argv[0]->type == ESEXP_RES_STRING) {
- if (p->source && p->uid)
+ if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
camel_folder_set_message_flags(p->source, p->uid, camel_system_flag(argv[0]->value.string), ~0);
else
p->info->flags |= camel_system_flag (argv[0]->value.string)|CAMEL_MESSAGE_FOLDER_FLAGGED;