Mercurial > pidgin
changeset 18438:02d93d5adca9
merge of '72d84aa6f2acbef6d592de141c3a8f6f5c4e7fd6'
and 'cccd519c3b17db70c06cc472252bcfac440810cc'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 05 Jul 2007 07:00:15 +0000 |
parents | ecb223f9f75b (current diff) 1bb77e24cced (diff) |
children | ec80e921818c ac7b380daa0a |
files | |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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);