Mercurial > pidgin
diff src/util.c @ 1376:730a1a19b4cc
[gaim-migrate @ 1386]
yay, no more negative online times. also no more correction_time. i hope this doesn't break things. it shoudln't, right? oh well. um. since there's no more correction_time there's no more reason to force ourselves as a buddy (right?), so that also fixes the problem of yahoo forcing you to have yourself as a buddy.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 04 Jan 2001 22:58:08 +0000 |
parents | fbc0cbf24a62 |
children | 5c67b8794991 |
line wrap: on
line diff
--- a/src/util.c Thu Jan 04 22:46:19 2001 +0000 +++ b/src/util.c Thu Jan 04 22:58:08 2001 +0000 @@ -33,6 +33,7 @@ #include <sys/wait.h> #include <gtk/gtk.h> #include <ctype.h> +#include <math.h> #include <pixmaps/aimicon.xpm> #include "gaim.h" @@ -68,7 +69,7 @@ } -gchar *sec_to_text(gint sec) +gchar *sec_to_text(guint sec) { int hrs, min; char minutes[64]; @@ -86,11 +87,11 @@ if (min == 1) g_snprintf(minutes, sizeof(minutes), "%d minute.", min); else - g_snprintf(minutes, sizeof(minutes), "%d minutes.", min); + g_snprintf(minutes, sizeof(minutes), "%d minutes.", abs(min)); sep = ", "; } else { if (!hrs) - g_snprintf(minutes, sizeof(minutes), "%d minutes.", min); + g_snprintf(minutes, sizeof(minutes), "%d minutes.", abs(min)); else { minutes[0] = '.'; minutes[1] = '\0'; @@ -102,7 +103,7 @@ if (hrs == 1) g_snprintf(hours, sizeof(hours), "%d hour%s", hrs, sep); else - g_snprintf(hours, sizeof(hours), "%d hours%s", hrs, sep); + g_snprintf(hours, sizeof(hours), "%d hours%s", abs(hrs), sep); } else hours[0] = '\0';