diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-03-18 07:54:01 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-03-18 07:54:01 +0800 |
commit | be6335128da92389defd81dc58132387f1f400d8 (patch) | |
tree | 43d88cc87f2d4ffef294159f7acb7a4a84c5d580 | |
parent | b16a04e98d4d6afd4507fcd8e9bf31358f1b6344 (diff) | |
download | gsoc2013-evolution-be6335128da92389defd81dc58132387f1f400d8.tar gsoc2013-evolution-be6335128da92389defd81dc58132387f1f400d8.tar.gz gsoc2013-evolution-be6335128da92389defd81dc58132387f1f400d8.tar.bz2 gsoc2013-evolution-be6335128da92389defd81dc58132387f1f400d8.tar.lz gsoc2013-evolution-be6335128da92389defd81dc58132387f1f400d8.tar.xz gsoc2013-evolution-be6335128da92389defd81dc58132387f1f400d8.tar.zst gsoc2013-evolution-be6335128da92389defd81dc58132387f1f400d8.zip |
Since we are now using filter-option widgets in place of system-flag, we
2001-03-17 Jeffrey Stedfast <fejj@ximian.com>
* filter-option.c (build_code): Since we are now using
filter-option widgets in place of system-flag, we do not need a
"code" part so if there isn't a code part, don't build it.
(clone): Updated to allow NULL code parts.
svn path=/trunk/; revision=8789
-rw-r--r-- | filter/ChangeLog | 7 | ||||
-rw-r--r-- | filter/filter-option.c | 9 | ||||
-rw-r--r-- | filter/filter-part.c | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index af70a59ec7..3bc7887e4a 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,5 +1,12 @@ 2001-03-17 Jeffrey Stedfast <fejj@ximian.com> + * filter-option.c (build_code): Since we are now using + filter-option widgets in place of system-flag, we do not need a + "code" part so if there isn't a code part, don't build it. + (clone): Updated to allow NULL code parts. + +2001-03-17 Jeffrey Stedfast <fejj@ximian.com> + * filter-element.c (filter_element_new_type_name): If the filter type is a "system-flag", use the optionlist type as type system-flag has been removed. This should allow backward diff --git a/filter/filter-option.c b/filter/filter-option.c index 6a81c75f95..3992c9e46a 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -193,7 +193,7 @@ xml_create (FilterElement *fe, xmlNodePtr node) work = work->next; } d(printf ("creating new option:\n title %s\n value %s\n code %s\n", - op->title, op->value, op->code)); + op->title, op->value, op->code ? op->code : "none")); fo->options = g_list_append (fo->options, op); if (fo->current == NULL) fo->current = op; @@ -296,7 +296,7 @@ build_code (FilterElement *fe, GString *out, struct _FilterPart *ff) d(printf ("building option code %p, current = %p\n", fo, fo->current)); - if (fo->current) { + if (fo->current && fo->current->code) { filter_part_expand_code (ff, fo->current->code, out); } } @@ -328,7 +328,10 @@ clone (FilterElement *fe) d(printf (" option %s\n", op->title)); fn->title = g_strdup (op->title); fn->value = g_strdup (op->value); - fn->code = g_strdup (op->code); + if (op->code) + fn->code = g_strdup (op->code); + else + fn->code = NULL; new->options = g_list_append (new->options, fn); l = g_list_next (l); diff --git a/filter/filter-part.c b/filter/filter-part.c index 5d9df3a617..1243b6105e 100644 --- a/filter/filter-part.c +++ b/filter/filter-part.c @@ -414,7 +414,7 @@ filter_part_expand_code (FilterPart *ff, const char *source, GString *out) FilterElement *fe; start = source; - while ( (newstart = strstr (start, "${")) + while (start && (newstart = strstr (start, "${")) && (end = strstr (newstart+2, "}")) ) { len = end - newstart - 2; if (len + 1 > namelen) { |