diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2014-05-29 13:16:54 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2014-05-29 13:16:54 +0200 |
| commit | 4e061860c7e20b0a795f6caaac9fdccf66b5a908 (patch) | |
| tree | 691972d7f9e6316706c0d5d00377835fce193f3b | |
| parent | b903ea35b56f4d91523e4aecae56b03da4f3fcf1 (diff) | |
Count days instead of 100s of hours
| -rw-r--r-- | src/customcellrendererleft.c | 8 |
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); + } } |
