diff options
author | raveit65 <[email protected]> | 2016-07-09 20:00:33 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-07-25 16:13:41 +0200 |
commit | 3902409bb09d5db383e88164bbf2d07811ca7392 (patch) | |
tree | ca80fd7186c384735ff9dc1a5840f153c679ea0f /src | |
parent | 2028048b148559cada1f700305fd39b192dd8c89 (diff) | |
download | mate-power-manager-3902409bb09d5db383e88164bbf2d07811ca7392.tar.bz2 mate-power-manager-3902409bb09d5db383e88164bbf2d07811ca7392.tar.xz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/gpm-upower.c | 9 |
1 files 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 || |