aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util/cal-component.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-12-20 02:12:57 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-12-20 02:12:57 +0800
commitde861766eded0c80ffbe050088043a16d7e4923f (patch)
tree5010fda36af306efaab59e11ebfa12b7bd43023a /calendar/cal-util/cal-component.c
parent20dabfff3014eb67b5c930345e8cb64116dba374 (diff)
downloadgsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.tar
gsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.tar.gz
gsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.tar.bz2
gsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.tar.lz
gsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.tar.xz
gsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.tar.zst
gsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.zip
Fix confusion in the way the range is expanded.
2000-12-19 Federico Mena Quintero <federico@helixcode.com> * pcs/cal-backend-file.c (compute_alarm_range): Fix confusion in the way the range is expanded. * cal-util/cal-component.c (cal_component_alarms_free): Doh, alarms->alarms is a list, not a generic pointer. Free it properly. (cal_component_free_pilot_id): Removed unused function. (cal_component_free_pilot_status): Likewise. * gui/main.c (init_bonobo): Use VERSION instead of a hardcoded string. Pass argc by value, not by reference. Test the return value of gnome_init_with_popt_table(). * cal-client/cal-client.c (cal_client_free_alarms): Oops, missed implementing this function. * cal-util/timeutil.c (print_time_t): Better printing format. (isodiff_to_secs): Removed unused function. (isodiff_from_secs): Removed unused function. (time_day_end): Removed crufty part. (time_day_begin): Removed crufty part. (time_day_hour): Removed unused function. (format_simple_hour): Removed unused function. (get_time_t_hour): Removed unused function. (time_from_start_duration): Removed unused function. * cal-util/timeutil.h (parse_date): Removed unimplemented, unused function prototype. svn path=/trunk/; revision=7083
Diffstat (limited to 'calendar/cal-util/cal-component.c')
-rw-r--r--calendar/cal-util/cal-component.c170
1 files changed, 70 insertions, 100 deletions
diff --git a/calendar/cal-util/cal-component.c b/calendar/cal-util/cal-component.c
index 1ece361da7..0c7ca50d9f 100644
--- a/calendar/cal-util/cal-component.c
+++ b/calendar/cal-util/cal-component.c
@@ -1130,73 +1130,6 @@ cal_component_set_uid (CalComponent *comp, const char *uid)
}
/**
- * cal_component_get_status:
- * @comp: A calendar component object.
- * @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, 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);
-
- if (!priv->status) {
- *status = ICAL_STATUS_NONE;
- return;
- }
-
- *status = icalproperty_get_status (priv->status);
-}
-
-/**
- * cal_component_set_status:
- * @comp: A calendar component object.
- * @status: Status value. You should use #ICAL_STATUS_NONE if you want to unset
- * this property.
- *
- * Sets the status property of a calendar component object.
- **/
-void
-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));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- priv->need_sequence_inc = TRUE;
-
- if (status == ICAL_STATUS_NONE) {
- if (priv->status) {
- icalcomponent_remove_property (priv->icalcomp, priv->status);
- icalproperty_free (priv->status);
- priv->status = NULL;
- }
-
- return;
- }
-
- if (priv->status) {
- icalproperty_set_status (priv->status, status);
- } else {
- priv->status = icalproperty_new_status (status);
- icalcomponent_add_property (priv->icalcomp, priv->status);
- }
-}
-
-/**
* cal_component_get_categories_list:
* @comp: A calendar component object.
* @categ_list: Return value for the list of strings, where each string is a
@@ -2381,8 +2314,7 @@ cal_component_get_exrule_list (CalComponent *comp, GSList **recur_list)
* @comp: A calendar component object.
* @recur_list: Returns a list of exception rule properties.
*
- * Returns a list of exception rule properties of a calendar component
- * object.
+ * Queries the list of exception rule properties of a calendar component object.
**/
void
cal_component_get_exrule_property_list (CalComponent *comp, GSList **recur_list)
@@ -2802,8 +2734,7 @@ cal_component_get_rrule_list (CalComponent *comp, GSList **recur_list)
* @comp: A calendar component object.
* @recur_list: Returns a list of recurrence rule properties.
*
- * Returns a list of recurrence rule properties of a calendar component
- * object.
+ * Queries a list of recurrence rule properties of a calendar component object.
**/
void
cal_component_get_rrule_property_list (CalComponent *comp, GSList **recur_list)
@@ -2951,6 +2882,73 @@ cal_component_set_sequence (CalComponent *comp, int *sequence)
}
/**
+ * cal_component_get_status:
+ * @comp: A calendar component object.
+ * @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, 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);
+
+ if (!priv->status) {
+ *status = ICAL_STATUS_NONE;
+ return;
+ }
+
+ *status = icalproperty_get_status (priv->status);
+}
+
+/**
+ * cal_component_set_status:
+ * @comp: A calendar component object.
+ * @status: Status value. You should use #ICAL_STATUS_NONE if you want to unset
+ * this property.
+ *
+ * Sets the status property of a calendar component object.
+ **/
+void
+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));
+
+ priv = comp->priv;
+ g_return_if_fail (priv->icalcomp != NULL);
+
+ priv->need_sequence_inc = TRUE;
+
+ if (status == ICAL_STATUS_NONE) {
+ if (priv->status) {
+ icalcomponent_remove_property (priv->icalcomp, priv->status);
+ icalproperty_free (priv->status);
+ priv->status = NULL;
+ }
+
+ return;
+ }
+
+ if (priv->status) {
+ icalproperty_set_status (priv->status, status);
+ } else {
+ priv->status = icalproperty_new_status (status);
+ icalcomponent_add_property (priv->icalcomp, priv->status);
+ }
+}
+
+/**
* cal_component_get_summary:
* @comp: A calendar component object.
* @summary: Return value for the summary property and its parameters.
@@ -3369,34 +3367,6 @@ cal_component_free_sequence (int *sequence)
}
/**
- * cal_component_free_pilot_id:
- * @sequence: Sequence number value.
- *
- * Frees a sequence number value.
- **/
-void
-cal_component_free_pilot_id (unsigned long *pilot_id)
-{
- g_return_if_fail (pilot_id != NULL);
-
- g_free (pilot_id);
-}
-
-/**
- * cal_component_free_pilot_status:
- * @sequence: Sequence number value.
- *
- * Frees a sequence number value.
- **/
-void
-cal_component_free_pilot_status (unsigned long *pilot_status)
-{
- g_return_if_fail (pilot_status != NULL);
-
- g_free (pilot_status);
-}
-
-/**
* cal_component_free_text_list:
* @text_list: List of #CalComponentText structures.
*
@@ -3625,7 +3595,7 @@ cal_component_alarms_free (CalComponentAlarms *alarms)
g_free (instance);
}
- g_free (alarms->alarms);
+ g_slist_free (alarms->alarms);
g_free (alarms);
}