aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-power.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/indicator-power.c')
-rw-r--r--src/indicator-power.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c
index bfb625b..e0d8795 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -315,7 +315,7 @@ build_device_time_details (const gchar *device_name,
*accesible_name = g_strdup (*details);
*short_details = g_strdup (_("(charged)"));
}
- else
+ else if (percentage > 0)
{
/* TRANSLATORS: %2 is a percentage value. Note: this string is only
* used when we don't have a time value */
@@ -325,6 +325,12 @@ build_device_time_details (const gchar *device_name,
*short_details = g_strdup_printf (_("(%.0lf%%)"),
percentage);
}
+ else
+ {
+ *details = g_strdup_printf (_("%s (not present)"), device_name);
+ *accesible_name = g_strdup (*details);
+ *short_details = g_strdup (_("(not present)"));
+ }
}
}