diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-04-06 23:35:42 +0000 |
---|---|---|
committer | CI Train Bot <ci-train-bot@canonical.com> | 2015-04-06 23:35:42 +0000 |
commit | 227aa820086c19279743d502fd5e78cf17144b24 (patch) | |
tree | 9465713567b8af9f8f9762450bb43ae5a39a7fb8 /src/main.cpp | |
parent | 9f48c6479a17771597544adc36eac968b9b5c027 (diff) | |
parent | 10c574cc26a4a55d63eed7f3b846efb4d766dd6b (diff) | |
download | ayatana-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/main.cpp')
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9aa502c..907d49f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -138,11 +138,13 @@ main(int /*argc*/, char** /*argv*/) auto notification_engine = std::make_shared<uin::Engine>("indicator-datetime-service"); std::unique_ptr<Snap> snap (new Snap(notification_engine, state->settings)); auto alarm_queue = create_simple_alarm_queue(state->clock, snooze_planner, engine, timezone_); - auto on_snooze = [snooze_planner](const Appointment& a) {snooze_planner->add(a);}; - auto on_ok = [](const Appointment&){}; - auto on_alarm_reached = [&engine, &snap, &on_snooze, &on_ok](const Appointment& a) { - (*snap)(a, on_snooze, on_ok); - engine->disable_ubuntu_alarm(a); + auto on_snooze = [snooze_planner](const Appointment& appointment, const Alarm& alarm) { + snooze_planner->add(appointment, alarm); + }; + auto on_ok = [](const Appointment&, const Alarm&){}; + auto on_alarm_reached = [&engine, &snap, &on_snooze, &on_ok](const Appointment& appointment, const Alarm& alarm) { + (*snap)(appointment, alarm, on_snooze, on_ok); + engine->disable_ubuntu_alarm(appointment); }; alarm_queue->alarm_reached().connect(on_alarm_reached); |