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-option.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-option.c')
-rw-r--r-- | filter/filter-option.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/filter/filter-option.c b/filter/filter-option.c index 10ac977a1d..bdac9288d3 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -234,8 +234,15 @@ xml_decode (FilterElement *fe, xmlNodePtr node) static void option_activate (GtkMenuItem *item, FilterOption *fo) { + FilterElement *fe = (FilterElement *) fo; + gboolean is_regex; + fo->current = gtk_object_get_data (GTK_OBJECT (item), "option"); d(printf ("option changed to %s\n", fo->current->title)); + + /* FIXME: there's probably a better way to do this */ + is_regex = !(!strstr (fo->current->title, "regex")); + fe->data = GINT_TO_POINTER (is_regex); } static GtkWidget * |