diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-09-13 06:06:46 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-09-13 06:06:46 +0800 |
commit | e01b1d7c259f148847e97d4c3e609933e26a73cf (patch) | |
tree | ec8f29ab4a07dd9bb64ec8e4c3b2223c2fbe9346 /filter/filter-rule.h | |
parent | 8be7f276a292ba85e6bec20fd7d5a351f094296e (diff) | |
download | gsoc2013-evolution-e01b1d7c259f148847e97d4c3e609933e26a73cf.tar.gz gsoc2013-evolution-e01b1d7c259f148847e97d4c3e609933e26a73cf.tar.zst gsoc2013-evolution-e01b1d7c259f148847e97d4c3e609933e26a73cf.zip |
Clone the current rule before editing it so that changes can be undone.
2001-09-12 Jeffrey Stedfast <fejj@ximian.com>
* rule-editor.c (rule_edit): Clone the current rule before editing
it so that changes can be undone.
(edit_editor_clicked): If the user hit OK, replace the original
rule with the new one.
* vfolder-rule.c (vfolder_rule_finalise): Free the sources list.
(rule_copy): Implemented.
* filter-filter.c (rule_copy): Implemented.
* filter-rule.c (filter_rule_copy): New convenience function to
copy one rule "into" another.
(rule_copy): Default implementation.
(filter_rule_clone): Use filter_rule_copy() internally to get rid
of the nastiness/slowness of xml encoding and then decoding.
svn path=/trunk/; revision=12787
Diffstat (limited to 'filter/filter-rule.h')
-rw-r--r-- | filter/filter-rule.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/filter/filter-rule.h b/filter/filter-rule.h index ffad99e627..41a10ca326 100644 --- a/filter/filter-rule.h +++ b/filter/filter-rule.h @@ -65,6 +65,8 @@ struct _FilterRuleClass { int (*xml_decode)(FilterRule *, xmlNodePtr, struct _RuleContext *); void (*build_code)(FilterRule *, GString *out); + + void (*copy)(FilterRule *dest, FilterRule *src); GtkWidget *(*get_widget)(FilterRule *fr, struct _RuleContext *f); @@ -74,7 +76,7 @@ struct _FilterRuleClass { guint filter_rule_get_type (void); FilterRule *filter_rule_new (void); -FilterRule *filter_rule_clone (FilterRule *base, struct _RuleContext *f); +FilterRule *filter_rule_clone (FilterRule *base); /* methods */ void filter_rule_set_name (FilterRule *fr, const char *name); @@ -85,6 +87,8 @@ int filter_rule_validate (FilterRule *fr); xmlNodePtr filter_rule_xml_encode (FilterRule *fr); int filter_rule_xml_decode (FilterRule *fr, xmlNodePtr node, struct _RuleContext *f); +void filter_rule_copy (FilterRule *dest, FilterRule *src); + void filter_rule_add_part (FilterRule *fr, FilterPart *fp); void filter_rule_remove_part (FilterRule *fr, FilterPart *fp); void filter_rule_replace_part(FilterRule *fr, FilterPart *fp, FilterPart *new); |