diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-12-12 10:17:32 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-12-12 10:17:32 +0800 |
commit | 1de2b20cd497dbf35c96b162dace5a211f2bc679 (patch) | |
tree | 22d38893fef73b960854cde9f2536e13a83ca8a2 /calendar/cal-util/cal-component.c | |
parent | cb96794cec2852c404677d969543c01bff8a3635 (diff) | |
download | gsoc2013-evolution-1de2b20cd497dbf35c96b162dace5a211f2bc679.tar.gz gsoc2013-evolution-1de2b20cd497dbf35c96b162dace5a211f2bc679.tar.zst gsoc2013-evolution-1de2b20cd497dbf35c96b162dace5a211f2bc679.zip |
This is to make things work with libical 0.21helix1 and later. Warnings
2000-12-11 Federico Mena Quintero <federico@helixcode.com>
This is to make things work with libical 0.21helix1 and later.
Warnings remain because at last libical was constified; will take
care of those tomorrow.
* cal-util/timeutil.h: #include <ical.h> instead of <icaltypes.h>
* gui/e-itip-control.c: Likewise.
* gui/e-meeting-edit.c: Likewise.
* gui/itip-utils.h: Likewise.
* cal-util/cal-component.c (alarm_uid_from_prop): constify.
(cal_component_get_status): Updated for new libical API.
(cal_component_set_status): Likewise.
* gui/calendar-model.c (ensure_task_complete): Removed unused
status code.
(ensure_task_not_complete): Update for new status API.
* gui/dialogs/task-editor.c (status_string_to_value): Removed
function.
(status_value_to_string): Removed function.
(status_string_map): Removed variable.
(fill_widgets): Update for new status API.
(dialog_to_comp_object): Likewise.
svn path=/trunk/; revision=6932
Diffstat (limited to 'calendar/cal-util/cal-component.c')
-rw-r--r-- | calendar/cal-util/cal-component.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/calendar/cal-util/cal-component.c b/calendar/cal-util/cal-component.c index 4aafdbf13a..cc920c19c6 100644 --- a/calendar/cal-util/cal-component.c +++ b/calendar/cal-util/cal-component.c @@ -607,7 +607,7 @@ scan_property (CalComponent *comp, icalproperty *prop) static const char * alarm_uid_from_prop (icalproperty *prop) { - char *xstr; + const char *xstr; g_assert (icalproperty_isa (prop) == ICAL_X_PROPERTY); @@ -1129,12 +1129,13 @@ cal_component_set_uid (CalComponent *comp, const char *uid) /** * cal_component_get_status: * @comp: A calendar component object. - * @status: Return value for the status string. + * @status: Return value for the status value. It is set to #ICAL_STATUS_NONE + * if the component has no status property. * * Queries the status property of a calendar component object. **/ void -cal_component_get_status (CalComponent *comp, const char **status) +cal_component_get_status (CalComponent *comp, icalproperty_status *status) { CalComponentPrivate *priv; @@ -1146,7 +1147,7 @@ cal_component_get_status (CalComponent *comp, const char **status) g_return_if_fail (priv->icalcomp != NULL); if (!priv->status) { - *status = NULL; + *status = ICAL_STATUS_NONE; return; } @@ -1156,25 +1157,25 @@ cal_component_get_status (CalComponent *comp, const char **status) /** * cal_component_set_status: * @comp: A calendar component object. - * @status: a status string, e.g. "IN-PROCESS", "NEEDS-ACTION". See the RFC. + * @status: Status value. You should use #ICAL_STATUS_NONE if you want to unset + * this property. * - * Sets the status string property of a calendar component object. + * Sets the status property of a calendar component object. **/ void -cal_component_set_status (CalComponent *comp, const char *status) +cal_component_set_status (CalComponent *comp, icalproperty_status status) { CalComponentPrivate *priv; g_return_if_fail (comp != NULL); g_return_if_fail (IS_CAL_COMPONENT (comp)); - g_return_if_fail (status != NULL); priv = comp->priv; g_return_if_fail (priv->icalcomp != NULL); priv->need_sequence_inc = TRUE; - if (status == NULL) { + if (status == ICAL_STATUS_NONE) { if (priv->status) { icalcomponent_remove_property (priv->icalcomp, priv->status); icalproperty_free (priv->status); @@ -1185,11 +1186,10 @@ cal_component_set_status (CalComponent *comp, const char *status) } if (priv->status) { - icalproperty_set_status (priv->status, (char *) status); + icalproperty_set_status (priv->status, status); } else { - priv->status = icalproperty_new_status ((char *) status); - icalcomponent_add_property (priv->icalcomp, - priv->status); + priv->status = icalproperty_new_status (status); + icalcomponent_add_property (priv->icalcomp, priv->status); } } |