aboutsummaryrefslogtreecommitdiff
path: root/src/actions-live.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-04-06 23:35:42 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-04-06 23:35:42 +0000
commit227aa820086c19279743d502fd5e78cf17144b24 (patch)
tree9465713567b8af9f8f9762450bb43ae5a39a7fb8 /src/actions-live.cpp
parent9f48c6479a17771597544adc36eac968b9b5c027 (diff)
parent10c574cc26a4a55d63eed7f3b846efb4d766dd6b (diff)
downloadayatana-indicator-datetime-227aa820086c19279743d502fd5e78cf17144b24.tar.gz
ayatana-indicator-datetime-227aa820086c19279743d502fd5e78cf17144b24.tar.bz2
ayatana-indicator-datetime-227aa820086c19279743d502fd5e78cf17144b24.zip
Improve valarm support to honor calendar events' valarm triggers. Fixes: #1419001
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'src/actions-live.cpp')
-rw-r--r--src/actions-live.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/actions-live.cpp b/src/actions-live.cpp
index 4d1f770..3cbfb78 100644
--- a/src/actions-live.cpp
+++ b/src/actions-live.cpp
@@ -135,12 +135,19 @@ void LiveActions::phone_open_alarm_app()
void LiveActions::phone_open_appointment(const Appointment& appt)
{
- if (!appt.url.empty())
- dispatch_url(appt.url);
- else if (appt.is_ubuntu_alarm())
- phone_open_alarm_app();
- else
- phone_open_calendar_app(DateTime::NowLocal());
+ if (!appt.activation_url.empty())
+ {
+ dispatch_url(appt.activation_url);
+ }
+ else switch (appt.type)
+ {
+ case Appointment::UBUNTU_ALARM:
+ phone_open_alarm_app();
+ break;
+
+ default:
+ phone_open_calendar_app(appt.begin);
+ }
}
void LiveActions::phone_open_calendar_app(const DateTime&)