From 9c1a5e97500a45d62ee0d8bc19b2c77e8234387d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Fri, 12 Aug 2011 12:03:14 +0100 Subject: Show time left to use without brackets, time left to charge with brackets. Fixes bug http://bugs.launchpad.net/indicator-power/+bug/824629 --- src/indicator-power.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/indicator-power.c b/src/indicator-power.c index dbc1d6a..9211b54 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -279,9 +279,6 @@ build_device_time_details (const gchar *device_name, &short_timestring, &detailed_timestring); - *short_details = g_strdup_printf ("(%s)", - short_timestring); - if (state == UP_DEVICE_STATE_CHARGING) { /* TRANSLATORS: %2 is a time string, e.g. "1 hour 5 minutes" */ @@ -289,9 +286,12 @@ build_device_time_details (const gchar *device_name, device_name, detailed_timestring, percentage); *details = g_strdup_printf (_("%s (%s to charge)"), device_name, short_timestring); + *short_details = g_strdup_printf ("(%s)", short_timestring); } else if (state == UP_DEVICE_STATE_DISCHARGING) { + *short_details = g_strdup_printf ("%s", short_timestring); + if (time > 43200) /* 12 hours */ { *accesible_name = g_strdup_printf (_("%s"), device_name); -- cgit v1.2.3