From 86957c92f84b21f6367c9a7b19a7a1b64822bb24 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 7 Mar 2001 21:42:17 +0000 Subject: Add an action-part widget. (filter_rule_from_mlist): Same here. This 2001-03-07 Jeffrey Stedfast * mail-autofilter.c (filter_rule_from_message): Add an action-part widget. (filter_rule_from_mlist): Same here. This should get rid of the problem where people go to create a rule based on a message and forget to fill-in the action part. svn path=/trunk/; revision=8586 --- mail/ChangeLog | 8 ++++++++ mail/mail-autofilter.c | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 0434931791..bdfab50949 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2001-03-07 Jeffrey Stedfast + + * mail-autofilter.c (filter_rule_from_message): Add an action-part + widget. + (filter_rule_from_mlist): Same here. This should get rid of the + problem where people go to create a rule based on a message and + forget to fill-in the action part. + 2001-03-07 Jeffrey Stedfast * mail-crypto.c (mail_crypto_is_smime_v3_signed): New function to diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index ca38085ebf..807667c152 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -253,14 +253,16 @@ vfolder_rule_from_message (VfolderContext *context, CamelMimeMessage *msg, int f } FilterRule * -filter_rule_from_message(FilterContext *context, CamelMimeMessage *msg, int flags) +filter_rule_from_message (FilterContext *context, CamelMimeMessage *msg, int flags) { FilterFilter *rule; + FilterPart *part; rule = filter_filter_new (); rule_from_message ((FilterRule *)rule, (RuleContext *)context, msg, flags); - /* should we define the default action? */ + part = filter_context_next_action (context, NULL); + filter_filter_add_action (rule, filter_part_clone (part)); return (FilterRule *)rule; } @@ -299,14 +301,16 @@ vfolder_rule_from_mlist(VfolderContext *context, const char *mlist, const char * } FilterRule * -filter_rule_from_mlist(FilterContext *context, const char *mlist) +filter_rule_from_mlist (FilterContext *context, const char *mlist) { FilterFilter *rule; + FilterPart *part; rule = filter_filter_new (); rule_from_mlist((FilterRule *)rule, (RuleContext *)context, mlist); - /* should we define the default action? */ + part = filter_context_next_action (context, NULL); + filter_filter_add_action (rule, filter_part_clone (part)); return (FilterRule *)rule; } -- cgit v1.2.3