# HG changeset patch # User Ka-Hing Cheung # Date 1183603194 0 # Node ID 1bb77e24ccedda9f961b01d973420ba1bbc26df3 # Parent 2bf8792760fe7235fee11cc6718a47a746bd5db5# Parent cbec54ecd9ab29d8c0c6aff5b79b076d95182bf5 merge of '6521407fd5a6d9175e6532a874a2735658c113e9' and 'ba88a6b875fc14033652fe01e39b92c155521ecb' diff -r 2bf8792760fe -r 1bb77e24cced ChangeLog --- a/ChangeLog Thu Jul 05 00:56:26 2007 +0000 +++ b/ChangeLog Thu Jul 05 02:39:54 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 2bf8792760fe -r 1bb77e24cced pidgin/gtkblist.c --- a/pidgin/gtkblist.c Thu Jul 05 00:56:26 2007 +0000 +++ b/pidgin/gtkblist.c Thu Jul 05 02:39:54 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); diff -r 2bf8792760fe -r 1bb77e24cced pidgin/gtkdocklet.c