diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-03-08 05:42:17 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-03-08 05:42:17 +0800 |
commit | 86957c92f84b21f6367c9a7b19a7a1b64822bb24 (patch) | |
tree | 46195a2acab6b90397e474a5abef35cb08d79cd7 /mail/mail-autofilter.c | |
parent | e6d034f7558f4017ae1fc2d123b10474d79aed6f (diff) | |
download | gsoc2013-evolution-86957c92f84b21f6367c9a7b19a7a1b64822bb24.tar.gz gsoc2013-evolution-86957c92f84b21f6367c9a7b19a7a1b64822bb24.tar.zst gsoc2013-evolution-86957c92f84b21f6367c9a7b19a7a1b64822bb24.zip |
Add an action-part widget. (filter_rule_from_mlist): Same here. This
2001-03-07 Jeffrey Stedfast <fejj@ximian.com>
* 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
Diffstat (limited to 'mail/mail-autofilter.c')
-rw-r--r-- | mail/mail-autofilter.c | 12 |
1 files changed, 8 insertions, 4 deletions
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; } |