aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/cal-util')
-rw-r--r--calendar/cal-util/cal-component.c16
-rw-r--r--calendar/cal-util/cal-component.h4
2 files changed, 8 insertions, 12 deletions
diff --git a/calendar/cal-util/cal-component.c b/calendar/cal-util/cal-component.c
index c7800f0456..d74c1238b2 100644
--- a/calendar/cal-util/cal-component.c
+++ b/calendar/cal-util/cal-component.c
@@ -4573,12 +4573,12 @@ cal_component_alarm_set_action (CalComponentAlarm *alarm, CalAlarmAction action)
/**
* cal_component_alarm_get_attach:
* @alarm: An alarm.
- * @attach: Return value for the attachment; should be freed using icalattachtype_free().
+ * @attach: Return value for the attachment; should be freed using icalattach_unref().
*
* Queries the attachment property of an alarm.
**/
void
-cal_component_alarm_get_attach (CalComponentAlarm *alarm, struct icalattachtype **attach)
+cal_component_alarm_get_attach (CalComponentAlarm *alarm, icalattach **attach)
{
g_return_if_fail (alarm != NULL);
g_return_if_fail (attach != NULL);
@@ -4586,12 +4586,8 @@ cal_component_alarm_get_attach (CalComponentAlarm *alarm, struct icalattachtype
g_assert (alarm->icalcomp != NULL);
if (alarm->attach) {
- *attach = icalattachtype_new ();
- **attach = icalproperty_get_attach (alarm->attach);
- /* FIXME: This is bogus in libical; icalattachtype is supposed
- * to be refcounted but the property functions return it by
- * value.
- */
+ *attach = icalproperty_get_attach (alarm->attach);
+ icalattach_ref (*attach);
} else
*attach = NULL;
}
@@ -4604,7 +4600,7 @@ cal_component_alarm_get_attach (CalComponentAlarm *alarm, struct icalattachtype
* Sets the attachment property of an alarm.
**/
void
-cal_component_alarm_set_attach (CalComponentAlarm *alarm, struct icalattachtype *attach)
+cal_component_alarm_set_attach (CalComponentAlarm *alarm, icalattach *attach)
{
g_return_if_fail (alarm != NULL);
@@ -4617,7 +4613,7 @@ cal_component_alarm_set_attach (CalComponentAlarm *alarm, struct icalattachtype
}
if (attach) {
- alarm->attach = icalproperty_new_attach (*attach);
+ alarm->attach = icalproperty_new_attach (attach);
icalcomponent_add_property (alarm->icalcomp, alarm->attach);
}
}
diff --git a/calendar/cal-util/cal-component.h b/calendar/cal-util/cal-component.h
index b0545397b4..ef38483c68 100644
--- a/calendar/cal-util/cal-component.h
+++ b/calendar/cal-util/cal-component.h
@@ -437,8 +437,8 @@ const char *cal_component_alarm_get_uid (CalComponentAlarm *alarm);
void cal_component_alarm_get_action (CalComponentAlarm *alarm, CalAlarmAction *action);
void cal_component_alarm_set_action (CalComponentAlarm *alarm, CalAlarmAction action);
-void cal_component_alarm_get_attach (CalComponentAlarm *alarm, struct icalattachtype **attach);
-void cal_component_alarm_set_attach (CalComponentAlarm *alarm, struct icalattachtype *attach);
+void cal_component_alarm_get_attach (CalComponentAlarm *alarm, icalattach **attach);
+void cal_component_alarm_set_attach (CalComponentAlarm *alarm, icalattach *attach);
void cal_component_alarm_get_description (CalComponentAlarm *alarm, CalComponentText *description);
void cal_component_alarm_set_description (CalComponentAlarm *alarm, CalComponentText *description);