aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-power.c
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2011-08-12 12:03:14 +0100
committerJavier Jardón <javier.jardon@codethink.co.uk>2011-08-12 12:03:14 +0100
commit9c1a5e97500a45d62ee0d8bc19b2c77e8234387d (patch)
treea9805f12e2f7ecc1d338bf06ffe020b6c34cf06c /src/indicator-power.c
parent632244509d85412748cc2b024a5d92b43306034d (diff)
downloadayatana-indicator-power-9c1a5e97500a45d62ee0d8bc19b2c77e8234387d.tar.gz
ayatana-indicator-power-9c1a5e97500a45d62ee0d8bc19b2c77e8234387d.tar.bz2
ayatana-indicator-power-9c1a5e97500a45d62ee0d8bc19b2c77e8234387d.zip
Show time left to use without brackets, time left to charge with brackets.
Fixes bug http://bugs.launchpad.net/indicator-power/+bug/824629
Diffstat (limited to 'src/indicator-power.c')
-rw-r--r--src/indicator-power.c6
1 files 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);