summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-10-18 13:07:54 +0200
committerMilan Crha <mcrha@redhat.com>2011-10-18 13:07:54 +0200
commit01f8a361389e065aa671ef17703a8d007100a881 (patch)
tree4c31039642f800e920dc8368fa952aa1635160c3
parentcca25e98a71d8c06f9ce1b53658ec4675f2dd5c2 (diff)
downloadevolution-data-server-01f8a361389e065aa671ef17703a8d007100a881.tar.gz
Bug #661549 - Avoid fetching from backend when calculating summary
-rw-r--r--calendar/backends/contacts/e-cal-backend-contacts.c8
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 9ac3781a2..81b09e896 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);