From 8168150a489cb9ef5e18725f2fb83952d19f7c46 Mon Sep 17 00:00:00 2001 From: Javier Jardon Date: Tue, 5 Jul 2011 16:27:25 +0100 Subject: Always show 2 digits for the minutes --- src/indicator-power.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/indicator-power.c b/src/indicator-power.c index e43616e..09d2081 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -169,7 +169,7 @@ get_timestring (guint64 time_secs, if (minutes < 60) { - *short_timestring = g_strdup_printf ("0:%i", minutes); + *short_timestring = g_strdup_printf ("0:%.2i", minutes); *detailed_timestring = g_strdup_printf (ngettext ("%i minute", "%i minutes", minutes), minutes); @@ -179,7 +179,7 @@ get_timestring (guint64 time_secs, hours = minutes / 60; minutes = minutes % 60; - *short_timestring = g_strdup_printf ("%i:%i", hours, minutes); + *short_timestring = g_strdup_printf ("%i:%.2i", hours, minutes); if (minutes == 0) { -- cgit v1.2.3