[evolution-data-server] Bug #661549 - Avoid fetching from backend when calculating summary



commit 01f8a361389e065aa671ef17703a8d007100a881
Author: Milan Crha <mcrha redhat com>
Date:   Tue Oct 18 13:07:54 2011 +0200

    Bug #661549 - Avoid fetching from backend when calculating summary

 .../backends/contacts/e-cal-backend-contacts.c     |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/calendar/backends/contacts/e-cal-backend-contacts.c b/calendar/backends/contacts/e-cal-backend-contacts.c
index 9ac3781..81b09e8 100644
--- a/calendar/backends/contacts/e-cal-backend-contacts.c
+++ b/calendar/backends/contacts/e-cal-backend-contacts.c
@@ -705,9 +705,11 @@ create_component (ECalBackendContacts *cbc,
 	ECalComponent             *cal_comp;
 	ECalComponentText          comp_summary;
 	icalcomponent             *ical_comp;
+	icalproperty		  *prop;
 	struct icaltimetype        itt;
 	ECalComponentDateTime      dt;
 	struct icalrecurrencetype  r;
+	gchar			  *since_year;
 	GSList recur_list;
 
 	g_return_val_if_fail (E_IS_CAL_BACKEND_CONTACTS (cbc), NULL);
@@ -717,6 +719,12 @@ create_component (ECalBackendContacts *cbc,
 
 	ical_comp = icalcomponent_new (ICAL_VEVENT_COMPONENT);
 
+	since_year = g_strdup_printf ("%04d", cdate->year);
+	prop = icalproperty_new_x (since_year);
+	icalproperty_set_x_name (prop, "X-EVOLUTION-SINCE-YEAR");
+	icalcomponent_add_property (ical_comp, prop);
+	g_free (since_year);
+
 	/* Create the event object */
 	cal_comp = e_cal_component_new ();
 	e_cal_component_set_icalcomponent (cal_comp, ical_comp);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]