aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-01-15 13:15:27 -0600
committerCharles Kerr <charles.kerr@canonical.com>2015-01-15 13:15:27 -0600
commit14c515bd83b9773880f30f4748505ce4a3d5f1fe (patch)
tree0f172f5d51713c111e7d04508a03b1af18ee8d78 /src
parentf926c6711feb56d831f5a09d6be6d62bf87cd87b (diff)
downloadayatana-indicator-datetime-14c515bd83b9773880f30f4748505ce4a3d5f1fe.tar.gz
ayatana-indicator-datetime-14c515bd83b9773880f30f4748505ce4a3d5f1fe.tar.bz2
ayatana-indicator-datetime-14c515bd83b9773880f30f4748505ce4a3d5f1fe.zip
strengthen the test that decides if an icalcomponent is a one-shot or repeating.
Diffstat (limited to 'src')
-rw-r--r--src/engine-eds.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp
index 210ef42..47c7a9b 100644
--- a/src/engine-eds.cpp
+++ b/src/engine-eds.cpp
@@ -534,8 +534,11 @@ private:
icalcomponent * icc = nullptr;
if (e_cal_client_get_object_finish (E_CAL_CLIENT(client), result, &icc, nullptr))
{
- struct icaltimetype itt = icalcomponent_get_recurrenceid(icc);
- if (icaltime_is_null_time(itt))
+ auto rrule_property = icalcomponent_get_first_property (icc, ICAL_RRULE_PROPERTY); // transfer none
+ auto rdate_property = icalcomponent_get_first_property (icc, ICAL_RDATE_PROPERTY); // transfer none
+ const bool is_nonrepeating = (rrule_property == nullptr) && (rdate_property == nullptr);
+
+ if (is_nonrepeating)
{
g_debug("'%s' appears to be a one-time alarm... adding 'disabled' tag.",
icalcomponent_as_ical_string(icc));