summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-07-11 13:06:26 +0200
committerraveit65 <[email protected]>2016-07-25 16:13:41 +0200
commitab62a95bb36351eb67638a992bfc57aff3deda87 (patch)
tree3a5329b27df9378945ac954ed1aae36729253534
parent7afdafd4dd9d053ec0fefb0ed02ff7fe96bc91cf (diff)
downloadmate-power-manager-ab62a95bb36351eb67638a992bfc57aff3deda87.tar.bz2
mate-power-manager-ab62a95bb36351eb67638a992bfc57aff3deda87.tar.xz
Do not issue a console warning when laptop batteries are empty
inspired from: https://git.gnome.org/browse/gnome-power-manager/commit/?id=65752cc
-rw-r--r--src/gpm-upower.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpm-upower.c b/src/gpm-upower.c
index 43969e2..168e879 100644
--- a/src/gpm-upower.c
+++ b/src/gpm-upower.c
@@ -300,11 +300,17 @@ gpm_upower_get_device_summary (UpDevice *device)
/* TRANSLATORS: this is only shown for laptops with multiple batteries */
description = g_strdup_printf (_("%s waiting to charge (%.1f%%)"), kind_desc, percentage);
+ } else if (state == UP_DEVICE_STATE_EMPTY) {
+
+ /* TRANSLATORS: when the device has no charge left */
+ description = g_strdup_printf (_("%s empty"), kind_desc);
+
} else {
egg_warning ("in an undefined state we are not charging or "
"discharging and the batteries are also not charged");
description = g_strdup_printf ("%s (%.1f%%)", kind_desc, percentage);
}
+
return description;
}