diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-12-07 20:52:50 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-12-07 20:52:50 -0600 |
commit | f84d3bdb7006eee351942a31d033ca0d62f3292a (patch) | |
tree | 9323a1d16768edce93cde0414451a592299753c3 /src/main.cpp | |
parent | 9f29b40133fc419a7a74379c55d63c105a4c2c16 (diff) | |
download | ayatana-indicator-datetime-f84d3bdb7006eee351942a31d033ca0d62f3292a.tar.gz ayatana-indicator-datetime-f84d3bdb7006eee351942a31d033ca0d62f3292a.tar.bz2 ayatana-indicator-datetime-f84d3bdb7006eee351942a31d033ca0d62f3292a.zip |
disable one-time alarms after their notifications are shown.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index aa8f829..1761f84 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -139,7 +139,10 @@ main(int /*argc*/, char** /*argv*/) 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 = [&snap, &on_snooze, &on_ok](const Appointment& a) {(*snap)(a, on_snooze, on_ok);}; + auto on_alarm_reached = [&engine, &snap, &on_snooze, &on_ok](const Appointment& a) { + (*snap)(a, on_snooze, on_ok); + engine->disable_ubuntu_alarm(a); + }; alarm_queue->alarm_reached().connect(on_alarm_reached); // create the menus |