From ab62a95bb36351eb67638a992bfc57aff3deda87 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mon, 11 Jul 2016 13:06:26 +0200 Subject: Do not issue a console warning when laptop batteries are empty inspired from: https://git.gnome.org/browse/gnome-power-manager/commit/?id=65752cc --- src/gpm-upower.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- cgit v1.2.1