aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-06-08 10:49:52 +0200
committerRobert Tari <robert@tari.in>2023-06-08 10:49:52 +0200
commited6a9a2114c577c67923f6524d4e7bcb989be3c0 (patch)
tree452bf4176650a2bb2d4e670619ac0d84af8b99df /src
parent254bd7f76f6a3587208c8487f606b1b378b74c34 (diff)
parente089a84b306ef09667752b910d87538043140042 (diff)
downloadayatana-indicator-datetime-ed6a9a2114c577c67923f6524d4e7bcb989be3c0.tar.gz
ayatana-indicator-datetime-ed6a9a2114c577c67923f6524d4e7bcb989be3c0.tar.bz2
ayatana-indicator-datetime-ed6a9a2114c577c67923f6524d4e7bcb989be3c0.zip
Merge branch 'ubports-personal/peat-psuwit/for-upstream_alarm-sound'
Attributes GH PR #106: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/106
Diffstat (limited to 'src')
-rw-r--r--src/engine-eds.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp
index b7f4682..2748fc1 100644
--- a/src/engine-eds.cpp
+++ b/src/engine-eds.cpp
@@ -635,19 +635,18 @@ private:
auto action = e_cal_component_alarm_get_action(alarm);
if (action == E_CAL_COMPONENT_ALARM_AUDIO)
{
- ICalAttach *attach = nullptr;
auto attachments = e_cal_component_alarm_get_attachments(alarm);
- if (attachments != nullptr && attachments->next != nullptr)
- attach = I_CAL_ATTACH (attachments->data);
+ for (; attachments != nullptr; attachments = attachments->next) {
+ ICalAttach *attach = I_CAL_ATTACH (attachments->data);
- if (attach != nullptr)
- {
- if (i_cal_attach_get_is_url (attach))
+ if (attach != nullptr && i_cal_attach_get_is_url (attach))
{
const char* url = i_cal_attach_get_url(attach);
- if (url != nullptr)
+ if (url != nullptr) {
ret = url;
+ break;
+ }
}
}
if (ret.empty())