aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2016-04-14 18:23:44 -0300
committerRobert Tari <robert@tari.in>2021-07-06 01:16:47 +0200
commit629e74043b1815bd8aad6eab154fc26a6a74c8d4 (patch)
treea7edb29402439ea83b590d2d228e11d1a811f28a
parent88bef033cf6b337ebbb085d5dc9aa46040f4b0b3 (diff)
downloadayatana-indicator-datetime-629e74043b1815bd8aad6eab154fc26a6a74c8d4.tar.gz
ayatana-indicator-datetime-629e74043b1815bd8aad6eab154fc26a6a74c8d4.tar.bz2
ayatana-indicator-datetime-629e74043b1815bd8aad6eab154fc26a6a74c8d4.zip
Play event sound even if the event has only text reminders.
-rw-r--r--src/snap.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/snap.cpp b/src/snap.cpp
index 259592e..a1caf62 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -101,7 +101,10 @@ public:
// calendar events are muted in silent mode; alarm clocks never are
std::shared_ptr<ain::Sound> sound;
- if (appointment.is_ubuntu_alarm() || (alarm.has_sound() && !silent_mode())) {
+ // play reminder sound even if the event is only a text reminder.
+ // we choose that because events synced from google only get text reminders
+ bool play_sound = (alarm.has_sound() || alarm.has_text());
+ if (appointment.is_ubuntu_alarm() || (play_sound && !silent_mode())) {
// create the sound.
const auto role = appointment.is_ubuntu_alarm() ? "alarm" : "alert";
const auto uri = get_alarm_uri(appointment, alarm, m_settings);