aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-11-04 11:18:24 +0100
committerRobert Tari <robert@tari.in>2023-11-04 11:18:24 +0100
commit0b8c415d7c86bb2f1f93fab017424c6778b80d8c (patch)
treea87a7e84c19f5e49f215066d2b95a6cf911279e9 /src/service.c
parent5a029486a08b5421586685c1e0fe16ff15093ba2 (diff)
parent55c6fbd978d2d6922a2cd72c422ae8c581268721 (diff)
downloadayatana-indicator-power-0b8c415d7c86bb2f1f93fab017424c6778b80d8c.tar.gz
ayatana-indicator-power-0b8c415d7c86bb2f1f93fab017424c6778b80d8c.tar.bz2
ayatana-indicator-power-0b8c415d7c86bb2f1f93fab017424c6778b80d8c.zip
Merge branch 'sunweaver-pr/rda-optional'
Attributes GH PR #89: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/89
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");