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-element.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-element.c')
-rw-r--r-- | filter/filter-element.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/filter/filter-element.c b/filter/filter-element.c index 21df744fe5..ad6e133a6a 100644 --- a/filter/filter-element.c +++ b/filter/filter-element.c @@ -31,6 +31,7 @@ #include "filter-folder.h" #include "filter-url.h" +static gboolean validate (FilterElement *fe, gpointer data); static void xml_create(FilterElement *fe, xmlNodePtr node); static FilterElement *clone(FilterElement *fe); @@ -83,6 +84,7 @@ filter_element_class_init (FilterElementClass *class) object_class->finalize = filter_element_finalise; /* override methods */ + class->validate = validate; class->xml_create = xml_create; class->clone = clone; @@ -121,6 +123,12 @@ filter_element_new (void) return o; } +gboolean +filter_element_validate (FilterElement *fe, gpointer data) +{ + return ((FilterElementClass *)((GtkObject *)fe)->klass)->validate (fe, data); +} + /** * filter_element_xml_create: * @fe: filter element @@ -261,6 +269,12 @@ filter_element_new_type_name (const char *type) } /* default implementations */ +static gboolean +validate (FilterElement *fe, gpointer data) +{ + return TRUE; +} + static void xml_create (FilterElement *fe, xmlNodePtr node) { @@ -280,5 +294,3 @@ clone (FilterElement *fe) return new; } - - |