diff options
author | Seth Alves <alves@src.gnome.org> | 2000-04-25 04:01:44 +0800 |
---|---|---|
committer | Seth Alves <alves@src.gnome.org> | 2000-04-25 04:01:44 +0800 |
commit | 33f48d299ea754aa6679a092ad820e8c96a020f6 (patch) | |
tree | 64c0bb75a340a59ed485bf13761149ced216f8da /calendar/pcs/icalendar-save.c | |
parent | d38dcd1631a6017598a78f7cc82a48b50753a911 (diff) | |
download | gsoc2013-evolution-33f48d299ea754aa6679a092ad820e8c96a020f6.tar gsoc2013-evolution-33f48d299ea754aa6679a092ad820e8c96a020f6.tar.gz gsoc2013-evolution-33f48d299ea754aa6679a092ad820e8c96a020f6.tar.bz2 gsoc2013-evolution-33f48d299ea754aa6679a092ad820e8c96a020f6.tar.lz gsoc2013-evolution-33f48d299ea754aa6679a092ad820e8c96a020f6.tar.xz gsoc2013-evolution-33f48d299ea754aa6679a092ad820e8c96a020f6.tar.zst gsoc2013-evolution-33f48d299ea754aa6679a092ad820e8c96a020f6.zip |
allow for null CN (parse_person): allow for null sent_by
* pcs/icalendar.c (parse_person): allow for null CN
(parse_person): allow for null sent_by
* pcs/Makefile.am: build icalendar-test
* pcs/icalendar-test.c: a test which loads an ical file and
converts it to our internal format, and then saves it back out.
svn path=/trunk/; revision=2588
Diffstat (limited to 'calendar/pcs/icalendar-save.c')
-rw-r--r-- | calendar/pcs/icalendar-save.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/calendar/pcs/icalendar-save.c b/calendar/pcs/icalendar-save.c index a3b2505778..1b35d2dadf 100644 --- a/calendar/pcs/icalendar-save.c +++ b/calendar/pcs/icalendar-save.c @@ -164,9 +164,9 @@ icalcomponent_create_from_ical_object (iCalObject *ical) /*** transp ***/ { if (ical->transp == ICAL_TRANSP_PROPERTY) - icalproperty_set_transp (prop, "TRANSPARENT"); + prop = icalproperty_new_transp ("TRANSPARENT"); else - icalproperty_set_transp (prop, "OPAQUE"); + prop = icalproperty_new_transp ("OPAQUE"); icalcomponent_add_property (comp, prop); } @@ -347,8 +347,10 @@ void unparse_person (iCalPerson *person, icalproperty *person_prop) /* convert iCalPerson to an icalproperty */ - param = icalparameter_new_cn (person->name); - icalproperty_add_parameter (person_prop, param); + if (person->name) { + param = icalparameter_new_cn (person->name); + icalproperty_add_parameter (person_prop, param); + } if (g_strcasecmp (person->role, "CHAIR") == 0) param = icalparameter_new_role (ICAL_ROLE_CHAIR); @@ -418,7 +420,10 @@ void unparse_person (iCalPerson *person, icalproperty *person_prop) icalproperty_add_parameter (person_prop, param); } - param = icalparameter_new_sentby (person->sent_by); + if (person->sent_by) { + param = icalparameter_new_sentby (person->sent_by); + icalproperty_add_parameter (person_prop, param); + } /* ret->deleg_to is a list of ICAL_DIR_PARAMETER */ /* FIX ME ... */ |