aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardon <javier.jardon@codethink.co.uk>2011-07-05 16:27:25 +0100
committerJavier Jardon <javier.jardon@codethink.co.uk>2011-07-05 16:27:25 +0100
commit8168150a489cb9ef5e18725f2fb83952d19f7c46 (patch)
tree5f46500993aab1d83c088010dde6fb63fcc2e582
parent2957a0b58a18b0db22068c7b2663fd7d898aa85f (diff)
downloadayatana-indicator-power-8168150a489cb9ef5e18725f2fb83952d19f7c46.tar.gz
ayatana-indicator-power-8168150a489cb9ef5e18725f2fb83952d19f7c46.tar.bz2
ayatana-indicator-power-8168150a489cb9ef5e18725f2fb83952d19f7c46.zip
Always show 2 digits for the minutes
-rw-r--r--src/indicator-power.c4
1 files 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)
{