# HG changeset patch # User Luke Schierer # Date 1088513417 0 # Node ID 79c4acbac4cdf069b76cbf9a52548d0d5ffae6e5 # Parent 2c6af2767fcf7bbcc351e4d29bd67c475acf2c2e [gaim-migrate @ 10242] " gaim_str_seconds_to_string returns an empty string for lengths of time under 1 minute. This leads to some odd-looking tooltips for people who have just logged in, for example. This patch resolves this by providing a nice seconds count for times under 1 minute." --Alan Ford committer: Tailor Script diff -r 2c6af2767fcf -r 79c4acbac4cd COPYRIGHT --- a/COPYRIGHT Tue Jun 29 12:29:22 2004 +0000 +++ b/COPYRIGHT Tue Jun 29 12:50:17 2004 +0000 @@ -49,6 +49,7 @@ Gavan Fantom (gavan) Rob Flynn Rob (rwf) Foehl +Alan Ford Nathan Fredrickson Chris J. Friesen Free Software Foundation diff -r 2c6af2767fcf -r 79c4acbac4cd ChangeLog --- a/ChangeLog Tue Jun 29 12:29:22 2004 +0000 +++ b/ChangeLog Tue Jun 29 12:50:17 2004 +0000 @@ -9,6 +9,8 @@ * The firefox browser option now works with firefox 0.9 * Buddy icons in conversations no longer depend on the buddy list + * Fix for the bug where some buddies seemed logged in 4 + thousand some odd days (Alan Ford) version 0.79 (06/24/2004): New Features: diff -r 2c6af2767fcf -r 79c4acbac4cd src/util.c --- a/src/util.c Tue Jun 29 12:29:22 2004 +0000 +++ b/src/util.c Tue Jun 29 12:50:17 2004 +0000 @@ -2384,6 +2384,15 @@ const char *prefix = ""; guint days, hrs, mins; + gstr = g_string_new(""); + + if (secs < 60) + { + g_string_append_printf(gstr, "%d %s", secs, + ngettext("second", "seconds", secs)); + return g_string_free(gstr, FALSE); + } + days = secs / (60 * 60 * 24); secs = secs % (60 * 60 * 24); hrs = secs / (60 * 60); @@ -2391,8 +2400,6 @@ mins = secs / 60; secs = secs % 60; - gstr = g_string_new(""); - if (days > 0) { g_string_append_printf(gstr, "%d %s", days,