aboutsummaryrefslogtreecommitdiff
path: root/src/engine-eds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine-eds.cpp')
-rw-r--r--src/engine-eds.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp
index 474bac5..b91fd71 100644
--- a/src/engine-eds.cpp
+++ b/src/engine-eds.cpp
@@ -34,9 +34,11 @@ namespace unity {
namespace indicator {
namespace datetime {
-static constexpr char const * TAG_ALARM {"x-canonical-alarm"};
+static constexpr char const * TAG_ALARM {"x-canonical-alarm"};
static constexpr char const * TAG_DISABLED {"x-canonical-disabled"};
+static constexpr char const * X_PROP_ACTIVATION_URL {"X-CANONICAL-ACTIVATION-URL"};
+
/****
*****
****/
@@ -537,6 +539,24 @@ private:
if (text.value)
appointment.summary = text.value;
+ auto icc = e_cal_component_get_icalcomponent(component); // component owns icc
+ if (icc)
+ {
+ auto icalprop = icalcomponent_get_first_property(icc, ICAL_X_PROPERTY);
+ while (icalprop)
+ {
+ const char * x_name = icalproperty_get_x_name(icalprop);
+ if ((x_name != nullptr) && !g_ascii_strcasecmp(x_name, X_PROP_ACTIVATION_URL))
+ {
+ const char * url = icalproperty_get_value_as_string(icalprop);
+ if ((url != nullptr) && appointment.url.empty())
+ appointment.url = url;
+ }
+
+ icalprop = icalcomponent_get_next_property(icc, ICAL_X_PROPERTY);
+ }
+ }
+
appointment.begin = begin_dt;
appointment.end = end_dt;
appointment.color = subtask->color;