diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-07-30 16:01:03 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-07-30 16:01:03 -0500 |
commit | 559d185dd7d51e56fbd8246970ef520d3edd18ae (patch) | |
tree | d9a4dca12256877c7a74a7361b84826e4dbd9871 /src/snap.cpp | |
parent | d6b290fda978379fb07285aaddfeb31686735667 (diff) | |
download | ayatana-indicator-datetime-559d185dd7d51e56fbd8246970ef520d3edd18ae.tar.gz ayatana-indicator-datetime-559d185dd7d51e56fbd8246970ef520d3edd18ae.tar.bz2 ayatana-indicator-datetime-559d185dd7d51e56fbd8246970ef520d3edd18ae.zip |
initial draft of haptic feedback when alarms play
Diffstat (limited to 'src/snap.cpp')
-rw-r--r-- | src/snap.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/snap.cpp b/src/snap.cpp index 0eb176c..f3e0f20 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -20,6 +20,7 @@ #include <datetime/snap.h> #include <notifications/awake.h> +#include <notifications/haptic.h> #include <notifications/sound.h> #include <gst/gst.h> @@ -76,6 +77,9 @@ public: const bool loop = m_engine->supports_actions(); auto sound = std::make_shared<uin::Sound>(uri, volume, loop); + // create the haptic feedback... + auto haptic = std::make_shared<uin::Haptic>(); + // show a notification... const auto minutes = std::chrono::minutes(m_settings->alarm_duration.get()); const bool interactive = m_engine->supports_actions(); @@ -94,10 +98,10 @@ public: b.add_action ("dismiss", _("Dismiss")); } - // add the 'sound' and 'awake' objects to the capture so that + // add 'sound', 'haptic', and 'awake' objects to the capture so // they stay alive until the closed callback is called; i.e., // for the lifespan of the notficiation - b.set_closed_callback([appointment, show, dismiss, sound, awake] + b.set_closed_callback([appointment, show, dismiss, sound, awake, haptic] (const std::string& action){ if (action == "show") show(appointment); |