diff options
author | Not Zed <NotZed@Ximian.com> | 2004-02-17 15:01:13 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-02-17 15:01:13 +0800 |
commit | d83995108ddfd2d9e1ba567f3325734f4dbce4bd (patch) | |
tree | fb1d90ef059ed1de50e96cb826482eb45501b235 /filter | |
parent | dc9818c5a34dfa178538117f2205a713f0d923f1 (diff) | |
download | gsoc2013-evolution-d83995108ddfd2d9e1ba567f3325734f4dbce4bd.tar.gz gsoc2013-evolution-d83995108ddfd2d9e1ba567f3325734f4dbce4bd.tar.zst gsoc2013-evolution-d83995108ddfd2d9e1ba567f3325734f4dbce4bd.zip |
implement, since we dont store the min/max values in the xml output, we
2004-02-17 Not Zed <NotZed@Ximian.com>
* filter-int.c (int_clone): implement, since we dont store the
min/max values in the xml output, we lose it otherwise. Bug
#54155.
svn path=/trunk/; revision=24757
Diffstat (limited to 'filter')
-rw-r--r-- | filter/ChangeLog | 6 | ||||
-rw-r--r-- | filter/filter-int.c | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index 7f631ac4d1..792a8a2bbe 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2004-02-17 Not Zed <NotZed@Ximian.com> + + * filter-int.c (int_clone): implement, since we dont store the + min/max values in the xml output, we lose it otherwise. Bug + #54155. + 2004-02-06 Hans Petter Jansson <hpj@ximian.com> * filter-input.c (filter_input_init): Default to an empty string diff --git a/filter/filter-int.c b/filter/filter-int.c index 48ef9f8d7d..0af282f1f3 100644 --- a/filter/filter-int.c +++ b/filter/filter-int.c @@ -34,6 +34,7 @@ #define d(x) static int int_eq (FilterElement *fe, FilterElement *cm); +static FilterElement *int_clone(FilterElement *fe); static void xml_create (FilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode (FilterElement *fe); static int xml_decode (FilterElement *fe, xmlNodePtr node); @@ -85,6 +86,7 @@ filter_int_class_init (FilterIntClass *klass) /* override methods */ fe_class->eq = int_eq; + fe_class->clone = int_clone; fe_class->xml_create = xml_create; fe_class->xml_encode = xml_encode; fe_class->xml_decode = xml_decode; @@ -150,6 +152,19 @@ int_eq (FilterElement *fe, FilterElement *cm) && ((FilterInt *)fe)->val == ((FilterInt *)cm)->val; } +static FilterElement * +int_clone(FilterElement *fe) +{ + FilterInt *fi, *fs; + + fs = (FilterInt *)fe; + fi = filter_int_new_type(fs->type, fs->min, fs->max); + fi->val = fs->val; + ((FilterElement *)fi)->name = g_strdup(fe->name); + + return (FilterElement *)fi; +} + static void xml_create (FilterElement *fe, xmlNodePtr node) { |