# HG changeset patch # User Ka-Hing Cheung # Date 1183602950 0 # Node ID cbec54ecd9ab29d8c0c6aff5b79b076d95182bf5 # Parent 98c1375232e2cdf8f96760136b6b0212c8a41504 Show idle times in the buddy list as days, hours, seconds. Patch from Andrew Gaul. diff -r 98c1375232e2 -r cbec54ecd9ab ChangeLog --- a/ChangeLog Sat Jun 23 03:08:06 2007 +0000 +++ b/ChangeLog Thu Jul 05 02:35:50 2007 +0000 @@ -17,6 +17,7 @@ directory. The net effect of this is that trying to start Pidgin a second time will raise the buddy list. (Gabriel Schulhof) * Undo capability in the conversation window + * Show idle times in the buddy list as days, hours, seconds version 2.0.2 (06/14/2007): Pidgin: diff -r 98c1375232e2 -r cbec54ecd9ab pidgin/gtkblist.c --- a/pidgin/gtkblist.c Sat Jun 23 03:08:06 2007 +0000 +++ b/pidgin/gtkblist.c Thu Jul 05 02:35:50 2007 +0000 @@ -3380,13 +3380,16 @@ time_t idle_secs = purple_presence_get_idle_time(presence); if (idle_secs > 0) { - int ihrs, imin; + int iday, ihrs, imin; time(&t); - ihrs = (t - idle_secs) / 3600; + iday = (t - idle_secs) / (24 * 60 * 60); + ihrs = ((t - idle_secs) / 60 / 60) % 24; imin = ((t - idle_secs) / 60) % 60; - if (ihrs) + if (iday) + idletime = g_strdup_printf(_("Idle %dd %dh %02dm"), iday, ihrs, imin); + else if (ihrs) idletime = g_strdup_printf(_("Idle %dh %02dm"), ihrs, imin); else idletime = g_strdup_printf(_("Idle %dm"), imin);