diff options
author | JP Rosevear <jpr@ximian.com> | 2001-02-07 05:11:37 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-02-07 05:11:37 +0800 |
commit | d35c4d3229ab795af12b7a384f983b50608dee38 (patch) | |
tree | 771f781ffc2ca512fc1ec2361150423fe0c6dd0b /calendar/cal-util | |
parent | f8f9d8aadbad0b97409c5296bc8f0a5330dbf362 (diff) | |
download | gsoc2013-evolution-d35c4d3229ab795af12b7a384f983b50608dee38.tar gsoc2013-evolution-d35c4d3229ab795af12b7a384f983b50608dee38.tar.gz gsoc2013-evolution-d35c4d3229ab795af12b7a384f983b50608dee38.tar.bz2 gsoc2013-evolution-d35c4d3229ab795af12b7a384f983b50608dee38.tar.lz gsoc2013-evolution-d35c4d3229ab795af12b7a384f983b50608dee38.tar.xz gsoc2013-evolution-d35c4d3229ab795af12b7a384f983b50608dee38.tar.zst gsoc2013-evolution-d35c4d3229ab795af12b7a384f983b50608dee38.zip |
If the categories string is empty, remove the property (get_period_list):
2001-02-06 JP Rosevear <jpr@ximian.com>
* cal-util/cal-component.c (cal_component_set_categories): If the
categories string is empty, remove the property
(get_period_list): Fixes from clahey to handle the new rdate
format in libical
(set_period_list): ditto
svn path=/trunk/; revision=8023
Diffstat (limited to 'calendar/cal-util')
-rw-r--r-- | calendar/cal-util/cal-component.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/calendar/cal-util/cal-component.c b/calendar/cal-util/cal-component.c index de7a768a17..26cb27e1bf 100644 --- a/calendar/cal-util/cal-component.c +++ b/calendar/cal-util/cal-component.c @@ -1166,7 +1166,7 @@ cal_component_set_categories (CalComponent *comp, const char *categories) priv = comp->priv; g_return_if_fail (priv->icalcomp != NULL); - if (!categories) { + if (!categories || !(*categories)) { if (priv->categories) { icalcomponent_remove_property (priv->icalcomp, priv->categories); icalproperty_free (priv->categories); @@ -1991,7 +1991,7 @@ cal_component_set_due (CalComponent *comp, CalComponentDateTime *dt) /* Builds a list of CalComponentPeriod structures based on a list of icalproperties */ static void get_period_list (GSList *period_list, - struct icalperiodtype (* get_prop_func) (icalproperty *prop), + struct icaldatetimeperiodtype (* get_prop_func) (icalproperty *prop), GSList **list) { GSList *l; @@ -2004,7 +2004,7 @@ get_period_list (GSList *period_list, for (l = period_list; l; l = l->next) { struct period *period; CalComponentPeriod *p; - struct icalperiodtype ip; + struct icaldatetimeperiodtype ip; period = l->data; g_assert (period->prop != NULL); @@ -2034,12 +2034,12 @@ get_period_list (GSList *period_list, ip = (* get_prop_func) (period->prop); - p->start = ip.start; + p->start = ip.period.start; if (p->type == CAL_COMPONENT_PERIOD_DATETIME) - p->u.end = ip.end; + p->u.end = ip.period.end; else if (p->type == CAL_COMPONENT_PERIOD_DURATION) - p->u.duration = ip.duration; + p->u.duration = ip.period.duration; else g_assert_not_reached (); @@ -2054,7 +2054,7 @@ get_period_list (GSList *period_list, /* Sets a period list value */ static void set_period_list (CalComponent *comp, - icalproperty *(* new_prop_func) (struct icalperiodtype period), + icalproperty *(* new_prop_func) (struct icaldatetimeperiodtype period), GSList **period_list, GSList *pl) { @@ -2084,7 +2084,7 @@ set_period_list (CalComponent *comp, for (l = pl; l; l = l->next) { CalComponentPeriod *p; struct period *period; - struct icalperiodtype ip; + struct icaldatetimeperiodtype ip; icalparameter_value value_type; g_assert (l->data != NULL); @@ -2092,14 +2092,14 @@ set_period_list (CalComponent *comp, /* Create libical value */ - ip.start = p->start; + ip.period.start = p->start; if (p->type == CAL_COMPONENT_PERIOD_DATETIME) { value_type = ICAL_VALUE_DATETIME; - ip.end = p->u.end; + ip.period.end = p->u.end; } else if (p->type == CAL_COMPONENT_PERIOD_DURATION) { value_type = ICAL_VALUE_DURATION; - ip.duration = p->u.duration; + ip.period.duration = p->u.duration; } else { g_assert_not_reached (); return; |