aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2016-04-14 18:23:44 -0300
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-29 14:37:39 +0200
commit6d9cae0de3d127c5b757fc6af482c047a1d81ab9 (patch)
tree9e43ce15ef5af5c3a8f21c1ff63096d554736e7e /src
parent7967430f1b1e11677baab5ebb941d738a54f198f (diff)
downloadayatana-indicator-datetime-6d9cae0de3d127c5b757fc6af482c047a1d81ab9.tar.gz
ayatana-indicator-datetime-6d9cae0de3d127c5b757fc6af482c047a1d81ab9.tar.bz2
ayatana-indicator-datetime-6d9cae0de3d127c5b757fc6af482c047a1d81ab9.zip
Play event sound even if the event has only text reminders.
Diffstat (limited to 'src')
-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);