# HG changeset patch # User Sadrul Habib Chowdhury # Date 1183618815 0 # Node ID 02d93d5adca9ded95cc331c488f627e5e2565c7b # Parent ecb223f9f75b81c4317011c99683d14bfc5ab973# Parent 1bb77e24ccedda9f961b01d973420ba1bbc26df3 merge of '72d84aa6f2acbef6d592de141c3a8f6f5c4e7fd6' and 'cccd519c3b17db70c06cc472252bcfac440810cc' diff -r ecb223f9f75b -r 02d93d5adca9 ChangeLog --- a/ChangeLog Thu Jul 05 06:54:18 2007 +0000 +++ b/ChangeLog Thu Jul 05 07:00:15 2007 +0000 @@ -22,6 +22,7 @@ * A new status area has been added to the top of conversations to provide additional detail about the buddy, including buddy icon, protocol and status message. + * Show idle times in the buddy list as days, hours, seconds Finch: * There's support for workspaces now (details in the manpage) diff -r ecb223f9f75b -r 02d93d5adca9 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Thu Jul 05 06:54:18 2007 +0000 +++ b/pidgin/gtkblist.c Thu Jul 05 07:00:15 2007 +0000 @@ -3417,13 +3417,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);