summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/customcellrendererleft.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/customcellrendererleft.c b/src/customcellrendererleft.c
index 2dc3ae9..f556173 100644
--- a/src/customcellrendererleft.c
+++ b/src/customcellrendererleft.c
@@ -138,10 +138,16 @@ void convert_left_to_string(gchar* str, guint size, gint64 left)
g_snprintf(str, size, "%02" G_GINT64_FORMAT "m%02" G_GINT64_FORMAT "s",
left / 60, left % 60);
}
- else
+ else if (left < 24 * 60 * 60)
{
left /= 60;
g_snprintf(str, size, "%" G_GINT64_FORMAT "h%02" G_GINT64_FORMAT "m",
left / 60, left % 60);
}
+ else
+ {
+ left /= 60 * 60;
+ g_snprintf(str, size, "%" G_GINT64_FORMAT "d%02" G_GINT64_FORMAT "h",
+ left / 24, left % 24);
+ }
}