diff options
author | Not Zed <NotZed@Ximian.com> | 2004-03-26 13:10:04 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-03-26 13:10:04 +0800 |
commit | 28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177 (patch) | |
tree | 5720e069c633f890b1a390fa96fb3826f7c537bd /filter/filter-option.c | |
parent | aebeb2ef7010d8f72508a6a6f4541f05a942853a (diff) | |
download | gsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.tar gsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.tar.gz gsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.tar.bz2 gsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.tar.lz gsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.tar.xz gsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.tar.zst gsoc2013-evolution-28e3d6dc45dd4ab5e0d34078fdf86f1923d0e177.zip |
return the added option. (clone): make sure we set the current option
2004-03-26 Not Zed <NotZed@Ximian.com>
* filter-option.c (filter_option_add): return the added option.
(clone): make sure we set the current option properly on the new
copy. See #56028.
* filtertypes.xml: s/pipe to shell command/pipe to program/
s/shell command/run program/, cleans up the UI a lot.
svn path=/trunk/; revision=25194
Diffstat (limited to 'filter/filter-option.c')
-rw-r--r-- | filter/filter-option.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/filter/filter-option.c b/filter/filter-option.c index 249e79c98b..7d1530620d 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -163,7 +163,7 @@ filter_option_set_current (FilterOption *option, const char *name) } /* used by implementers to add additional options */ -void +struct _filter_option * filter_option_add(FilterOption *fo, const char *value, const char *title, const char *code) { struct _filter_option *op; @@ -179,6 +179,8 @@ filter_option_add(FilterOption *fo, const char *value, const char *title, const fo->options = g_list_append(fo->options, op); if (fo->current == NULL) fo->current = op; + + return op; } static int @@ -349,7 +351,7 @@ clone (FilterElement *fe) { FilterOption *fo = (FilterOption *)fe, *new; GList *l; - struct _filter_option *op; + struct _filter_option *op, *newop; d(printf ("cloning option\n")); @@ -357,7 +359,9 @@ clone (FilterElement *fe) l = fo->options; while (l) { op = l->data; - filter_option_add (new, op->value, op->title, op->code); + newop = filter_option_add (new, op->value, op->title, op->code); + if (fo->current == op) + new->current = newop; l = l->next; } |