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 /filter/filter-option.c | |
parent | b16a04e98d4d6afd4507fcd8e9bf31358f1b6344 (diff) | |
download | gsoc2013-evolution-be6335128da92389defd81dc58132387f1f400d8.tar.gz 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
Diffstat (limited to 'filter/filter-option.c')
-rw-r--r-- | filter/filter-option.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); |