diff options
author | Robert Tari <robert@tari.in> | 2023-11-04 11:18:24 +0100 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2023-11-04 11:18:24 +0100 |
commit | 0b8c415d7c86bb2f1f93fab017424c6778b80d8c (patch) | |
tree | a87a7e84c19f5e49f215066d2b95a6cf911279e9 /src/service.c | |
parent | 5a029486a08b5421586685c1e0fe16ff15093ba2 (diff) | |
parent | 55c6fbd978d2d6922a2cd72c422ae8c581268721 (diff) | |
download | ayatana-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.c | 9 |
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"); |