diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-10-31 11:43:26 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-10-31 11:43:26 +0800 |
commit | 0eb24eaa396b7f5f3ebe6fab21080cda7ba7d4bc (patch) | |
tree | d3a41d97055a1a92aa804201dacef5385c062c48 /filter/filter-rule.c | |
parent | 7c3fad23b7c212cc96606a44e81d43e65b85acf8 (diff) | |
download | gsoc2013-evolution-0eb24eaa396b7f5f3ebe6fab21080cda7ba7d4bc.tar gsoc2013-evolution-0eb24eaa396b7f5f3ebe6fab21080cda7ba7d4bc.tar.gz gsoc2013-evolution-0eb24eaa396b7f5f3ebe6fab21080cda7ba7d4bc.tar.bz2 gsoc2013-evolution-0eb24eaa396b7f5f3ebe6fab21080cda7ba7d4bc.tar.lz gsoc2013-evolution-0eb24eaa396b7f5f3ebe6fab21080cda7ba7d4bc.tar.xz gsoc2013-evolution-0eb24eaa396b7f5f3ebe6fab21080cda7ba7d4bc.tar.zst gsoc2013-evolution-0eb24eaa396b7f5f3ebe6fab21080cda7ba7d4bc.zip |
If a regex option is selected, change the FilterElement data to TRUE else
2000-10-30 Jeffrey Stedfast <fejj@helixcode.com>
* filter-option.c (option_activate): If a regex option is
selected, change the FilterElement data to TRUE else set to FALSE.
* filter-rule.c (more_parts): Validate the previously entered
FilterPart before allowing the user to add a new FilterPart.
* filter-part.c (filter_part_validate): New convenience function
to validate an entire FilterPart expression.
* filter-input.c (validate): Validate the entry text if it
contains a regular expression.
* filter-element.[c,h]: New virtual function to validate the
contents of the FilterElement (useful for regex and sexp).
(filter_element_validate): You get the idea...
svn path=/trunk/; revision=6285
Diffstat (limited to 'filter/filter-rule.c')
-rw-r--r-- | filter/filter-rule.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/filter/filter-rule.c b/filter/filter-rule.c index 51e474aa72..a33373af5e 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -458,6 +458,17 @@ more_parts (GtkWidget *button, struct _rule_data *data) FilterPart *new; GtkWidget *w; + /* first make sure that the last part is ok */ + if (data->fr->parts) { + FilterPart *part; + GList *l; + + l = g_list_last (data->fr->parts); + part = l->data; + if (!filter_part_validate (part)) + return; + } + /* create a new rule entry, use the first type of rule */ new = rule_context_next_part (data->f, NULL); if (new) { |