Mercurial > pidgin.yaz
diff pidgin/gtkblist.c @ 18435:1bb77e24cced
merge of '6521407fd5a6d9175e6532a874a2735658c113e9'
and 'ba88a6b875fc14033652fe01e39b92c155521ecb'
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Thu, 05 Jul 2007 02:39:54 +0000 |
parents | 238086459dc4 cbec54ecd9ab |
children | 05cab350d1fb 720c61141f4b d5e2a4897bbc |
line wrap: on
line diff
--- 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);