aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-04 07:23:28 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-04 07:23:28 +0100
commit55c6fbd978d2d6922a2cd72c422ae8c581268721 (patch)
treea87a7e84c19f5e49f215066d2b95a6cf911279e9 /src/service.c
parent5a029486a08b5421586685c1e0fe16ff15093ba2 (diff)
downloadayatana-indicator-power-55c6fbd978d2d6922a2cd72c422ae8c581268721.tar.gz
ayatana-indicator-power-55c6fbd978d2d6922a2cd72c422ae8c581268721.tar.bz2
ayatana-indicator-power-55c6fbd978d2d6922a2cd72c422ae8c581268721.zip
{CMakeLists.txt,src/service.c}: Make building against librda optional.
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index bcc3950..69de20b 100644
--- a/src/service.c
+++ b/src/service.c
@@ -22,7 +22,9 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
-#include <rda/rda.h>
+#ifdef RDA_ENABLED
+# include <rda/rda.h>
+#endif /* RDA_ENABLED */
#include <ayatana/common/utils.h>
#include "brightness.h"
#include "dbus-shared.h"
@@ -1189,11 +1191,14 @@ indicator_power_service_init (IndicatorPowerService * self)
p->cancellable = g_cancellable_new ();
+#ifdef RDA_ENABLED
if (!ayatana_common_utils_is_lomiri())
{
p->bLocal = rda_session_is_local ();
}
- else {
+ else
+#endif /* RDA_ENABLED */
+ {
p->bLocal = TRUE;
}
p->settings = g_settings_new ("org.ayatana.indicator.power");