diff options
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c index 75a4139..ae886cc 100644 --- a/src/device.c +++ b/src/device.c @@ -518,7 +518,8 @@ indicator_power_device_get_time_details (const IndicatorPowerDevice * device, const time_t time = indicator_power_device_get_time (device); const UpDeviceState state = indicator_power_device_get_state (device); const gdouble percentage = indicator_power_device_get_percentage (device); - const gchar * device_name = device_kind_to_localised_string (indicator_power_device_get_kind(device)); + const UpDeviceKind kind = indicator_power_device_get_kind (device); + const gchar * device_name = device_kind_to_localised_string (kind); if (time > 0) { @@ -567,6 +568,12 @@ indicator_power_device_get_time_details (const IndicatorPowerDevice * device, *accessible_name = g_strdup (*details); *short_details = g_strdup_printf (_("(%.0lf%%)"), percentage); } + else if (kind == UP_DEVICE_KIND_LINE_POWER) + { + *details = g_strdup (device_name); + *accessible_name = g_strdup (device_name); + *short_details = g_strdup (device_name); + } else { *details = g_strdup_printf (_("%s (not present)"), device_name); |