diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-12-08 23:09:08 +0000 |
---|---|---|
committer | CI Train Bot <ci-train-bot@canonical.com> | 2014-12-08 23:09:08 +0000 |
commit | b05f411503474231de48ee038d16e2d0e49bed4f (patch) | |
tree | 160077bd77534638e0c5431670d1c6dc97b98dd2 /src/main.cpp | |
parent | 6de98acd45d855789fdd4bfdf45fa826eef22828 (diff) | |
parent | f84d3bdb7006eee351942a31d033ca0d62f3292a (diff) | |
download | ayatana-indicator-datetime-b05f411503474231de48ee038d16e2d0e49bed4f.tar.gz ayatana-indicator-datetime-b05f411503474231de48ee038d16e2d0e49bed4f.tar.bz2 ayatana-indicator-datetime-b05f411503474231de48ee038d16e2d0e49bed4f.zip |
After a one-time Ubuntu alarm's notification is displayed, disable the alarm. Fixes: #1362341
Approved by: Ted Gould, PS Jenkins bot
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 |