[evolution] Remove unused functions after itip_publish_comp() removal
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Remove unused functions after itip_publish_comp() removal
- Date: Thu, 28 Nov 2013 08:16:05 +0000 (UTC)
commit c8322a6c391cbbdc886e41f5c3a7cf5e7be272c9
Author: Milan Crha <mcrha redhat com>
Date: Thu Nov 28 09:15:16 2013 +0100
Remove unused functions after itip_publish_comp() removal
calendar/gui/itip-utils.c | 109 ---------------------------------------------
1 files changed, 0 insertions(+), 109 deletions(-)
---
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index a208ff4..50c06ac 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -2045,115 +2045,6 @@ itip_publish_begin (ECalComponent *pub_comp,
return TRUE;
}
-static void
-fb_sort (struct icalperiodtype *ipt,
- gint fb_count)
-{
- gint i,j;
-
- if (ipt == NULL || fb_count == 0)
- return;
-
- for (i = 0; i < fb_count - 1; i++) {
- for (j = i + 1; j < fb_count; j++) {
- struct icalperiodtype temp;
-
- if (icaltime_compare (ipt[i].start, ipt[j].start) < 0)
- continue;
-
- if (icaltime_compare (ipt[i].start, ipt[j].start) == 0) {
- if (icaltime_compare (ipt[i].end,
- ipt[j].start) < 0)
- continue;
- }
- temp = ipt[i];
- ipt[i] = ipt[j];
- ipt[j] = temp;
- }
- }
-}
-
-static icalcomponent *
-comp_fb_normalize (icalcomponent *icomp)
-{
- icalcomponent *iclone;
- icalproperty *prop, *p;
- const gchar *uid, *comment;
- struct icaltimetype itt;
- gint fb_count, i = 0, j;
- struct icalperiodtype *ipt;
-
- iclone = icalcomponent_new (ICAL_VFREEBUSY_COMPONENT);
-
- prop = icalcomponent_get_first_property (
- icomp, ICAL_ORGANIZER_PROPERTY);
- if (prop) {
- p = icalproperty_new_clone (prop);
- icalcomponent_add_property (iclone, p);
- }
-
- itt = icalcomponent_get_dtstart (icomp);
- icalcomponent_set_dtstart (iclone, itt);
-
- itt = icalcomponent_get_dtend (icomp);
- icalcomponent_set_dtend (iclone, itt);
-
- fb_count = icalcomponent_count_properties (
- icomp, ICAL_FREEBUSY_PROPERTY);
- ipt = g_new0 (struct icalperiodtype, fb_count + 1);
-
- for (prop = icalcomponent_get_first_property (icomp, ICAL_FREEBUSY_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (icomp, ICAL_FREEBUSY_PROPERTY))
- {
- ipt[i] = icalproperty_get_freebusy (prop);
- i++;
- }
-
- fb_sort (ipt, fb_count);
-
- for (j = 0; j <= fb_count - 1; j++) {
- icalparameter *param;
-
- prop = icalproperty_new_freebusy (ipt[j]);
- param = icalparameter_new_fbtype (ICAL_FBTYPE_BUSY);
- icalproperty_add_parameter (prop, param);
- icalcomponent_add_property (iclone, prop);
- }
- g_free (ipt);
-
- /* Should I strip this RFC 2446 says there must not be a UID
- if the METHOD is PUBLISH?? */
- uid = icalcomponent_get_uid (icomp);
- if (uid)
- icalcomponent_set_uid (iclone, uid);
-
- itt = icaltime_from_timet_with_zone (
- time (NULL), FALSE,
- icaltimezone_get_utc_timezone ());
- icalcomponent_set_dtstamp (iclone, itt);
-
- prop = icalcomponent_get_first_property (icomp, ICAL_URL_PROPERTY);
- if (prop) {
- p = icalproperty_new_clone (prop);
- icalcomponent_add_property (iclone, p);
- }
-
- comment = icalcomponent_get_comment (icomp);
- if (comment)
- icalcomponent_set_comment (iclone, comment);
-
- for (prop = icalcomponent_get_first_property (icomp, ICAL_X_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (icomp, ICAL_X_PROPERTY))
- {
- p = icalproperty_new_clone (prop);
- icalcomponent_add_property (iclone, p);
- }
-
- return iclone;
-}
-
static gboolean
check_time (const struct icaltimetype tmval,
gboolean can_null_time)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]