aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-08-31 13:23:07 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-08-31 13:25:09 +0200
commitbc6df2034b1fea39f326e8e9264f23e88b2dbeef (patch)
tree1c55a4d13a766abd7f96ca510556ca2f04f09249
parent3ddb5324ae9742c0c59aea6339a8ab1ee0c20585 (diff)
downloadayatana-indicator-power-bc6df2034b1fea39f326e8e9264f23e88b2dbeef.tar.gz
ayatana-indicator-power-bc6df2034b1fea39f326e8e9264f23e88b2dbeef.tar.bz2
ayatana-indicator-power-bc6df2034b1fea39f326e8e9264f23e88b2dbeef.zip
src/service.c: Ignore RDA's opinion when on Lomiri. Assume local session for Lomiri.
Relates to: https://github.com/ArcticaProject/librda/issues/8 Relates to: https://gitlab.com/ubports/development/core/packaging/ayatana-indicators/ayatana-indicator-power/-/issues/7#note_1535612053
-rw-r--r--src/service.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c
index 3f3e3b0..bcc3950 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1188,7 +1188,14 @@ indicator_power_service_init (IndicatorPowerService * self)
self->priv = p;
p->cancellable = g_cancellable_new ();
- p->bLocal = rda_session_is_local ();
+
+ if (!ayatana_common_utils_is_lomiri())
+ {
+ p->bLocal = rda_session_is_local ();
+ }
+ else {
+ p->bLocal = TRUE;
+ }
p->settings = g_settings_new ("org.ayatana.indicator.power");
p->brightness = indicator_power_brightness_new();