From 6efaf85e9ab1a241449871a106a31cf3ab3dc8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= Date: Fri, 19 Oct 2018 15:34:56 -0700 Subject: [PATCH] power: Label the PENDING_CHARGING state as "Not Charging" The pending-charge state means AC power is on but the battery is not being charged. This can happen because its charge is above a certain threshold, to avoid short charging cycles and prolong the battery's life, or because the PSU is not powerful enough to charge the batteries. Instead of lying to the user about something being estimated, we should simply tell the truth and set the label to "Not Charging". Closes: #249. --- panels/power/cc-power-panel.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c index c69df63d0..2bc846179 100644 --- a/panels/power/cc-power-panel.c +++ b/panels/power/cc-power-panel.c @@ -302,7 +302,6 @@ get_details_string (gdouble percentage, UpDeviceState state, guint64 time) switch (state) { case UP_DEVICE_STATE_CHARGING: - case UP_DEVICE_STATE_PENDING_CHARGE: /* TRANSLATORS: %1 is a time string, e.g. "1 hour 5 minutes" */ details = g_strdup_printf (_("%s until fully charged"), time_string); break; @@ -323,6 +322,10 @@ get_details_string (gdouble percentage, UpDeviceState state, guint64 time) /* TRANSLATORS: primary battery */ details = g_strdup (_("Fully charged")); break; + case UP_DEVICE_STATE_PENDING_CHARGE: + /* TRANSLATORS: primary battery */ + details = g_strdup (_("Not charging")); + break; case UP_DEVICE_STATE_EMPTY: /* TRANSLATORS: primary battery */ details = g_strdup (_("Empty")); @@ -337,7 +340,6 @@ get_details_string (gdouble percentage, UpDeviceState state, guint64 time) switch (state) { case UP_DEVICE_STATE_CHARGING: - case UP_DEVICE_STATE_PENDING_CHARGE: /* TRANSLATORS: primary battery */ details = g_strdup (_("Charging")); break; @@ -350,6 +352,10 @@ get_details_string (gdouble percentage, UpDeviceState state, guint64 time) /* TRANSLATORS: primary battery */ details = g_strdup (_("Fully charged")); break; + case UP_DEVICE_STATE_PENDING_CHARGE: + /* TRANSLATORS: primary battery */ + details = g_strdup (_("Not charging")); + break; case UP_DEVICE_STATE_EMPTY: /* TRANSLATORS: primary battery */ details = g_strdup (_("Empty"));