aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-02-28 23:47:15 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-02-28 23:47:15 +0100
commitb173fa10a30948f1604711d68bb83a9271b16ea9 (patch)
treefa4d337cdd3a00bb396170881d873982a451f102 /src
parent7f0e2f59bf896b64463fdcb6987203ebd0e7517b (diff)
parent8a223541810566c2c5ccc5d4f7f9f0b2425bf0ca (diff)
downloadayatana-indicator-power-b173fa10a30948f1604711d68bb83a9271b16ea9.tar.gz
ayatana-indicator-power-b173fa10a30948f1604711d68bb83a9271b16ea9.tar.bz2
ayatana-indicator-power-b173fa10a30948f1604711d68bb83a9271b16ea9.zip
Merge branch 'tari01-pr/lomiri-fake-battery'
Attributes GH PR #74: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/74
Diffstat (limited to 'src')
-rw-r--r--src/service.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index 293a983..f9122ba 100644
--- a/src/service.c
+++ b/src/service.c
@@ -494,6 +494,16 @@ create_header_state (IndicatorPowerService * self)
g_object_unref (icon);
}
}
+ else if (ayatana_common_utils_is_lomiri())
+ {
+ g_variant_builder_add (&b, "{sv}", "label", g_variant_new_string ("Fake battery"));
+ g_variant_builder_add (&b, "{sv}", "accessible-desc", g_variant_new_string ("Fake battery"));
+ GIcon *pIcon = g_themed_icon_new_with_default_fallbacks ("battery-missing-symbolic");
+ GVariant *pIconSerialised = g_icon_serialize (pIcon);
+ g_object_unref (pIcon);
+ g_variant_builder_add (&b, "{sv}", "icon", pIconSerialised);
+ g_variant_unref (pIconSerialised);
+ }
return g_variant_builder_end (&b);
}