diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-03-31 18:54:04 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2015-03-31 18:54:04 -0500 |
commit | fff19d70649589b81a896e4deb032a7bd4bdca1e (patch) | |
tree | 3b1db77981d5561aaec31c308c69c6dbbf9ded68 /src/actions-live.cpp | |
parent | 3c5eda144d9d83be1aef24afaa307999975ec617 (diff) | |
download | ayatana-indicator-datetime-fff19d70649589b81a896e4deb032a7bd4bdca1e.tar.gz ayatana-indicator-datetime-fff19d70649589b81a896e4deb032a7bd4bdca1e.tar.bz2 ayatana-indicator-datetime-fff19d70649589b81a896e4deb032a7bd4bdca1e.zip |
add an Alarm class to represent ical valarm components; change the Appointment class to hold an arbitrary number of Alarms.
Diffstat (limited to 'src/actions-live.cpp')
-rw-r--r-- | src/actions-live.cpp | 19 |
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&) |