diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-04-09 13:08:24 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2015-04-09 13:08:24 -0500 |
commit | 8d282df37c72ff27a006ff928f1b151d98aa0e45 (patch) | |
tree | 89d5ecc46c7e674e753e907f48d8e8acd4935d1a /src/main.cpp | |
parent | d5002c6b27cf0e00828555a10e89778008d6cd01 (diff) | |
parent | 49f49d4c18c2cc77a1a305c93a74e9e8ec903526 (diff) | |
download | ayatana-indicator-datetime-8d282df37c72ff27a006ff928f1b151d98aa0e45.tar.gz ayatana-indicator-datetime-8d282df37c72ff27a006ff928f1b151d98aa0e45.tar.bz2 ayatana-indicator-datetime-8d282df37c72ff27a006ff928f1b151d98aa0e45.zip |
sync with trunk
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); |