aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2022-02-23 02:28:41 +0100
committerRobert Tari <robert@tari.in>2022-02-23 02:57:55 +0100
commitcbf17a524ad51bef7fb034ca929f6f0da3fdb611 (patch)
tree1895752b1d11a92da673c1d5bd836622cee4c686 /src
parent8e990c91411ce1fe798eb16019e2543b40fc828b (diff)
downloadayatana-indicator-power-cbf17a524ad51bef7fb034ca929f6f0da3fdb611.tar.gz
ayatana-indicator-power-cbf17a524ad51bef7fb034ca929f6f0da3fdb611.tar.bz2
ayatana-indicator-power-cbf17a524ad51bef7fb034ca929f6f0da3fdb611.zip
Get Lomiri sounds path from lomiri-sounds pkg-config
Diffstat (limited to 'src')
-rw-r--r--src/notifier.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/notifier.c b/src/notifier.c
index ba30ae5..e833e72 100644
--- a/src/notifier.c
+++ b/src/notifier.c
@@ -1,6 +1,6 @@
/*
* Copyright 2014-2016 Canonical Ltd.
- * Copyright 2021 Robert Tari
+ * Copyright 2021-2022 Robert Tari
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
@@ -22,7 +22,11 @@
#include "datafiles.h"
#ifdef LOMIRI_FEATURES_ENABLED
-#include "dbus-accounts-sound.h"
+ #include "dbus-accounts-sound.h"
+#endif
+
+#ifndef LOMIRI_SOUNDSDIR
+ #define LOMIRI_SOUNDSDIR ""
#endif
#include "dbus-battery.h"
@@ -322,8 +326,8 @@ notification_show(IndicatorPowerNotifier * self)
}
else
{
- g_message("Unable to find '%s' in XDG data dirs, falling back to /usr/share/sounds/lomiri/notifications/", LOW_BATTERY_SOUND);
- notify_notification_set_hint(nn, "sound-file", g_variant_new_string("file:///usr/share/sounds/lomiri/notifications/" LOW_BATTERY_SOUND));
+ g_message("Unable to find '%s' in XDG data dirs, falling back to %s/notifications/", LOMIRI_SOUNDSDIR, LOW_BATTERY_SOUND);
+ notify_notification_set_hint(nn, "sound-file", g_variant_new_string("file://" LOMIRI_SOUNDSDIR "/notifications/" LOW_BATTERY_SOUND));
}
}