aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-05-04 08:32:57 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-05-04 08:32:57 +0200
commitd4e75ae9ca767eac3dea028e1f298e3de360d76c (patch)
tree75485035ae6a78c8c029196178756c77d3a742e4 /src
parent9299187a737e3c95b3df2d67b906ed816ee07d4b (diff)
downloadayatana-indicator-power-d4e75ae9ca767eac3dea028e1f298e3de360d76c.tar.gz
ayatana-indicator-power-d4e75ae9ca767eac3dea028e1f298e3de360d76c.tar.bz2
ayatana-indicator-power-d4e75ae9ca767eac3dea028e1f298e3de360d76c.zip
Revert "Fix percentage for mice and keyboards"
This reverts commit f94ffac7f36831dd8a79f30d5b94de9758fcd3a6. The original commit entirely broke unit tests. Next revision should adjust unit tests (or not break them).
Diffstat (limited to 'src')
-rw-r--r--src/device.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/device.c b/src/device.c
index f03d514..d2b9b74 100644
--- a/src/device.c
+++ b/src/device.c
@@ -775,15 +775,6 @@ get_menuitem_text (const IndicatorPowerDevice * device,
time_str = get_expanded_time_remaining (device);
}
- if (p->percentage > 0.01 && time_str != NULL)
- {
- if (g_str_equal(time_str, _("estimating…")) || g_str_equal(time_str, _("unknown")))
- {
- g_free(time_str);
- time_str = NULL;
- }
- }
-
if (time_str && *time_str)
{
/* TRANSLATORS: example: "battery (time remaining)" */
@@ -791,14 +782,7 @@ get_menuitem_text (const IndicatorPowerDevice * device,
}
else
{
- if (p->percentage > 0.01)
- {
- str = g_strdup_printf("%s (%.0lf%%)", kind_str, p->percentage);
- }
- else
- {
- str = g_strdup (kind_str);
- }
+ str = g_strdup (kind_str);
}
g_free (time_str);