From 9c1a5e97500a45d62ee0d8bc19b2c77e8234387d Mon Sep 17 00:00:00 2001 From: Javier Jardón 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(-) 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 From d5c1b2ce0defea98142f5f549cef88a389614e42 Mon Sep 17 00:00:00 2001 From: Javier Jardón Date: Fri, 12 Aug 2011 12:05:04 +0100 Subject: Release 0.6 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0372683..19ca570 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_INIT([indicator-power], - [0.5], + [0.6], [http://bugs.launchpad.net/indicator-power], [indicator-power], [http://launchpad.net/indicator-power]) -- cgit v1.2.3 From d88054a3a754778ea8221fe9187eea2bab21ac7b Mon Sep 17 00:00:00 2001 From: Javier Jardón Date: Fri, 12 Aug 2011 20:33:12 +0100 Subject: Free memory in the correct place --- src/indicator-power.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/indicator-power.c b/src/indicator-power.c index 9211b54..62cdb44 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -551,10 +551,10 @@ get_primary_device (GVariant *devices) { primary_device = device; } - } - g_free (device_icon); - g_free (object_path); + g_free (device_icon); + g_free (object_path); + } if (discharging) { -- cgit v1.2.3