From 3902409bb09d5db383e88164bbf2d07811ca7392 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sat, 9 Jul 2016 20:00:33 +0200 Subject: trivial: provide some text for devices that are not present in gpm_upower_get_device_summary() taken from: https://git.gnome.org/browse/gnome-power-manager/commit/?id=215f683 --- src/gpm-upower.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gpm-upower.c b/src/gpm-upower.c index 43f0568..43969e2 100644 --- a/src/gpm-upower.c +++ b/src/gpm-upower.c @@ -203,11 +203,14 @@ gpm_upower_get_device_summary (UpDevice *device) "time-to-empty", &time_to_empty, NULL); - if (!is_present) - return NULL; - kind_desc = gpm_device_kind_to_localised_string (kind, 1); + /* not installed */ + if (!is_present) { + /* TRANSLATORS: device not present */ + return g_strdup_printf (_("%s not present"), kind_desc); + } + /* don't display all the extra stuff for keyboards and mice */ if (kind == UP_DEVICE_KIND_MOUSE || kind == UP_DEVICE_KIND_KEYBOARD || -- cgit v1.2.1