aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-04-05 13:25:10 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-05-05 23:37:05 +0200
commit906c021e2ebd927b512c9d52c03c17e70c01f065 (patch)
tree7c7449e858ce4a0426a1b2be7270913f5d3b6ae2 /src/service.c
parenteeea7eab9aa5877f8e00cf3993ed088abd498427 (diff)
downloadayatana-indicator-power-906c021e2ebd927b512c9d52c03c17e70c01f065.tar.gz
ayatana-indicator-power-906c021e2ebd927b512c9d52c03c17e70c01f065.tar.bz2
ayatana-indicator-power-906c021e2ebd927b512c9d52c03c17e70c01f065.zip
Use the device model name in the menu
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index 32f8788..bdf4caa 100644
--- a/src/service.c
+++ b/src/service.c
@@ -517,11 +517,18 @@ create_devices_section (IndicatorPowerService * self, int profile)
if (kind == UP_DEVICE_KIND_BATTERY)
{
- sLabel = g_strdup (_("Charge level"));
+ if (!ayatana_common_utils_is_lomiri())
+ {
+ sLabel = indicator_power_device_get_readable_text (device, FALSE);
+ }
+ else
+ {
+ sLabel = g_strdup (_("Charge level"));
+ }
}
else
{
- sLabel = indicator_power_device_get_readable_text (device);
+ sLabel = indicator_power_device_get_readable_text (device, TRUE);
}
gchar *sIndicator = NULL;
@@ -1418,6 +1425,7 @@ create_totalled_battery_device (const GList * devices)
device = indicator_power_device_new (NULL,
UP_DEVICE_KIND_BATTERY,
+ NULL,
percent,
state,
time_left,