[evolution-data-server] [File Calendar] Include detailed information in Free/Busy response
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] [File Calendar] Include detailed information in Free/Busy response
- Date: Tue, 21 Nov 2017 16:10:33 +0000 (UTC)
commit 7f1a111c71a06c351ee8be3bd015ecd3cb922e98
Author: Milan Crha <mcrha redhat com>
Date: Tue Nov 21 17:08:49 2017 +0100
[File Calendar] Include detailed information in Free/Busy response
Let the file calendars return also X-SUMMARY and X-LOCATION information
in the Free/Busy response, thus the UI part can show what the occupied time
is for.
src/calendar/backends/file/e-cal-backend-file.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/calendar/backends/file/e-cal-backend-file.c b/src/calendar/backends/file/e-cal-backend-file.c
index 9ab3b8c..33de7bf 100644
--- a/src/calendar/backends/file/e-cal-backend-file.c
+++ b/src/calendar/backends/file/e-cal-backend-file.c
@@ -1969,6 +1969,7 @@ free_busy_instance (ECalComponent *comp,
icalparameter *param;
struct icalperiodtype ipt;
icaltimezone *utc_zone;
+ const gchar *summary, *location;
utc_zone = icaltimezone_get_utc_timezone ();
@@ -1983,6 +1984,13 @@ free_busy_instance (ECalComponent *comp,
param = icalparameter_new_fbtype (ICAL_FBTYPE_BUSY);
icalproperty_add_parameter (prop, param);
+ summary = icalcomponent_get_summary (e_cal_component_get_icalcomponent (comp));
+ if (summary && *summary)
+ icalproperty_set_parameter_from_string (prop, "X-SUMMARY", summary);
+ location = icalcomponent_get_location (e_cal_component_get_icalcomponent (comp));
+ if (location && *location)
+ icalproperty_set_parameter_from_string (prop, "X-LOCATION", location);
+
icalcomponent_add_property (vfb, prop);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]